Is it possible to have a restriction in the booking form to select only one type of ticket and only 1 ticket? I want to use the booking form to choose one distance for a running event. For example, you cannot run the 10k and half marathon for the same person in the same event multiple times.
Jos den Hollander
Hi Jos – does this tutorial do what you want: https://wp-event-organiser.com/blog/tutorial/limit-bookings-to-one-ticket/
It doesn’t cover how to alter the UI of the ticket selection (i.e. replacing a free-input quantity field with a radio field, for example, but that’s covered here).
Stephen Harris
hi Stephen, this is not what I meant. The tutoral describes about checking whether a booking (pending/confirmed) has already taken place but in my case I am looking for some logic in the booking form, before anything is saved in the database.
Normally the ticket picker shows all available (sellable) tickets and you can choose multiple (and quantities > 1) if you want. What I am looking for is that from the list of available tickets, you can choose only 1 and the quantity is always 1, actually you should not be able to select a quantity. A possible option is a dropdown, not based on an event date, but showing the available ticket types and hence you will be able to select only 1 type
Not sure if this is possible using the form elements. The ticket picker is something we cannot control using values from other input fields.
Jos den Hollander
I think the thread about using radios rather than a free input is what you’re after (using a dropdown hasn’t been tested).
With regards to the linked tutorial, that includes code to restricted the quantity of tickets at the server site. If you implement a client-only restriction (such as using radio fields) the user could still could send a payload to the server with multiple tickets, bypassing the UI.
Stephen Harris