I have a screen where the user can select the number of adult, child and infant tickets required for an event. If the event availability allows, it is displayed in the calendar which is clickable to take them to the booking page.
I’m passing the dropdown values via parameters in the URL so I can fetch them to use in the booking screen (at this point I don’t need to write anything to the dB and the user isn’t forced to have a user account).
The number of tickets chosen on the first screen are displaying correctly but I have noticed that when to user clicks the back button in their browse, or indeed when I introduce an ‘Amend’ button in case they need to change their ticket selections, the first screen displays their initial selection, the user makes changes, clicks to the booking screen once again but this time, the tickets are all showing the default values for each droop down rather than the users new selection/s.
First screen state upon user clicking back button from booking screen.
They are configured as below, the only difference between this adult-tickets field and the child/infant fields is the default value is zero for them whilst adults is defaulted to one
Ah so here’s where the issue is: you’ll need to set your dropdown’s default value to reflect a Get Info From URL - that way when the URL changes, the dropdown’s value will change.
Here’s what it would look like if the parameter you are sending to the URL is ‘adult’:
Thank you. That appears to have resolved the issue at hand when the user goes to the previous page using the back button/action in their browse.
Unfortunately it doesn’t quite fulfil my requirements because by introducing the ‘get from URL’ for default value I am no longer able to set zero for child and infant tickets.
This has been commented on my current booking system whereby users aren’t expecting to have to select a value for the child and infant fields based on the fact they are only interested in adult tickets. Setting these fields to zero by default was advantageous to me and my end users.
I’m doing some validation for the events that may appear in the calendar view based on ticket availability and to that the user selects for each field, adult, child and infant tickets.
I’d recommend playing around with Conditions. There’s at least 2 ways you could approach this: 1. Make sure you are setting parameters for ‘infant’ and ‘child’ in your URL, which would be set from the dropdown’s value. 2. Setup a condition on esch dropdown that when Get Data From URL’s child & infant value Is Empty, default to 0.