Good afternoon all.
I've hunted around and have yet to find a great worked example of how to handle a situation where I have multiple sessions for an event, and want to control the number of attendees per session.
In simple terms, I have x sessions each that can have y attendees. y might not be the same for each session.
I'd like to have a form that has a drop down with each available session, and a label along the lines of "I'd like to attend the:" with each available session. Once y people have registered for a given session x then I'd like session x to no longer appear in the list of available sessions.
I'm reasonably comfortable (I think) with the idea of dynamically populating the field with values. Its the conditional management of the counter (and persisting it) incrementing it based on each form submit.
the volumes aren't so critical that I need be concerned about a session having one slot left and two people booking simultaneously.
Thoughts?
Solved! Go to Solution.
Knowing what I conveniently already know about your environment 🙂 your webhook, triggered on Filled Out Form, would be
var counterName = `/webinars/programid/${Program.Id}`;
FBCounter.autoAdd(counterName);
and then on the landing page
<script>
function processRegCount(current){
if (current.count <= 10) {
// load form as usual
} else {
// redirect to 'Event Full' page, load a 'Wait List' form, show/hide content, etc.
}
}
</script>
<script src="https://api.teknkl.com/fbcounter/v1/counter/count/webinars/programid/{{Program.Id}}?public-api-key=<your public api key>&cb=processRegCount">
</script>
Knowing what I conveniently already know about your environment 🙂 your webhook, triggered on Filled Out Form, would be
var counterName = `/webinars/programid/${Program.Id}`;
FBCounter.autoAdd(counterName);
and then on the landing page
<script>
function processRegCount(current){
if (current.count <= 10) {
// load form as usual
} else {
// redirect to 'Event Full' page, load a 'Wait List' form, show/hide content, etc.
}
}
</script>
<script src="https://api.teknkl.com/fbcounter/v1/counter/count/webinars/programid/{{Program.Id}}?public-api-key=<your public api key>&cb=processRegCount">
</script>
That makes a measure of sense (and is heading down the path I expected).
I'll convert this into a fully worked example, and post it back here when done (although it'll probably involve a few more questions before I get there).
Cheers
Jo