The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Close the form after a certain amount of tickets are sold

Labels

This Discussion is public

Notifications

Hi, i've made a simple form where people can make ticket reservations for an event. Which is working nicely.

I've limited the total amount of entries via a code snippet in the functions.php to 200.

But since people can reserve multiple tickets per submission (simple number field), this would ultimately lead to more reserved tickets than are available.

How can i close the form after the total ticket amount from all the entries has reached 200?

Hi Chris.

This might be what you're looking for:

https://formidableforms.com/help-desk/reduce-value-of-a-custom-field-by-one-preferably-only-when-paypal-is-successful/

It may need a bit of adjustment to work exactly as you need but the concept sounds like it might be what you need.

Thanks

Chris

i think that's not exactly what i need. i need something that's way simpler actually. I have a ticket field, where people can enter any number of tickets they want to reserve, there is no payment involved at the moment.

So formidable simply needs to calculate the sum of all the values in the ticket field of all the entries and shut the form down when it reaches 200.

would that be possible?

Hi Chris,

Yes i think it's possible.

I haven't tried it but part of the method described in the link above sounds like it might do that what you need.

This is the part that sounds like it might suit your needs:

Have a Single Line Text field for the current number of tickets sold

Set to Visibility -> Admin or a Hidden field

Set default value to a stats code that gets the ticket total

General suggestion:  [frm-stats id=20 type=total 25="paid"]

where:
20 is the id of the field where the user chooses the number of tickets (or use this field's ID if only one ticket is sold per form and there's no ticket number field)

25 is the payment status field

Obviously you don't need to worry about checking to see if another field is marked as paid or not which is why i said in my original reply that it will need a bit of adjusting but the concept is there.

See if that works for you.

Thanks

Chris

Discussion closed.