I’m working on a way to dynamically switch an Event Registration form from the “Regular” registration default to “Waitlist”
by checking before Form page load the Seating Limit in the events table.
Registrants are allowed to submit “Waitlist” registrations if the Event is filled up – 70 “Regular” category records stored for an Event with a 70 seat maximum.
In PHP & mySQL applications I’d do a count with an sql query & see if the existing records were less than or equal to the seat limit value.
If I already had 70 “Regular” value Registrations then the Form would display that this was a Waiting List registration & Would the User like to continue with submitting the form as a request to be on the Waiting List in case there were cancellations.
I had different methods – including subtracting each registration from the seating limit until it reached 0 and setting the Waitlist from that value
Or doing a live query to simply count open Regular registrations & switch to “Waitlist” Type for the next Registration submit.
This was all Server Side.
So I’m wondering if some experienced Wappler users have an approach for Dynamic Browser side actions to get this same Case or Switch?
Each event master list has a field assigned with a numeric value of the maximum number of seats available for this event.
This is the value that everything is checked against.
When 70 records, for instance, with the “Regular” value are reached,
then all following Users can only Submit a form where the Type value is read-only “Waitlist”.
My other question is if this should be both a Server side action & browser side, too.
Thank you for your Wappler feedback!