Single ticket single quantity picker

WordPress Event Management, Calendars & Registration Forums Request A Feature Single ticket single quantity picker

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 6 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27214

    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
    #27225

    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
    #27239

    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
    #27246

    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
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.