Hi Everybody! I created a registration form for an event, connected to a database. There is a field, where you can give the number of registrated persons. There is a dropdown, where you can select which event (A, B, C, D) would you visit.
Is it possible, to restrict registration on those event, where the number of registrated persons reached the limit? (for example A event 20 person, B event 32 person).
Thanks!
Hi akifoki,
Yes. You'll need to use PHP in a Custom Code action to query the database, check the number of remaining places and show or hide the options in the drop-down.
Bob
Thanks GreyHead,
Could you please add some instructions how to hide an option in the drop-down? For the custom code and querying the db I found some solutions in the forum, but not for hiding one of a drop down element...
Hi Akifoki,
I would probably do it all with Custom Code. How exactly are you recording the events and registrations in the database tables?
Bob
In a dropdown you can add a nubmer of persons, this goes to a field in the db. Than you can select the event (Event A, Event B, etc) from a dropdown, this goes to another field in the db. I think i should run a SELECT SUM() to get the number of persons on every events. The event that reached the limit sholud not be displayed in a dropdown. If there is an easier way, I accept it...