55 Posts
Olek T.
4 years 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
55 Posts
Olek T.
4 years 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...

1283 Posts
Bucklash
4 years 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 Book for SEBLOD