This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand
2 months ago
2
Topic

Hi!

Here's my goal: I want to publish a form (with submissions being registered in database). When the amount of submissions reaches - let's say - 500, then the form isn't displayed and the page shows an information instead (like 'sorry, no more submissions this months').

How to achieve this? What Seblod extensions do I have to buy to be able to pull it off?

Thanks in advance!

Cheers,

Olek

Get a VIP membership
2 months ago
1
Level 1

Alright, sice it's so quiet here lately, I had to find a workaround - it's a bit dirty, but it works.

Here's what I've done: I made 'strategic' fields register into manually crated table X in my database (earlier the form was fully email-results-only) while submitting. Then I placed this form in a module. Then in native Joomla article I used Sourcerer (great extension!) and wrote a code to first count submitted forms in the table X and then simple condition to show the module with form inside this article only if the amount of submissions is lower or equals N, otherwise it shows that 'Sorry' text. 

I'm still wondering (out of ineterst), what could be the more elegant, pure-Seblod method though...

1272 Posts
Bucklash
2 months ago
0
Level 2

Nice that sorcerer works with seblod. funky.

I tried seblod break plugin but I could not get it to play ball....

Instead I created a text field with defaultvalue of 1.

then applied live/2 and did sql query. The field renders if value returned

In position override I did the if else statement based on whether field rendered.

ie

if ($cck->renderField(“some_field”)
{
echo $cck->renderField(“some_field_2”);
}
else
{
echo $cck->renderField(“some_field_3”);
}



Get a VIP membership