I’m trying to create a booking form for an adventure travel company that allows the user to input multiple person bookings. I’m not a web designer and am not adverse to coding, but I am wondering if there is a function on Wix Code that can help me achieve my goal.
1 guest booking example:
Is there a way I can program the ‘Number of Guest’ dropdown box to respond to the number selected and repeat the ‘Guest 1’ section as required? And will this type of form be able to automatically adjust and expand depending on the number of guests selected?
2 Guest booking example:
If anyone has any input or ideas I would greatly appreciate it!
Hi Emma,
yes there’s a way to do this.
I assume there’s a limit on the amount of guests you can book at once.
let’s say it’s 10 guests max.
so what you do is create a collection with fields for each guest, maybe something like this:
{trip, numOfGuests, Guest1Name, Guest1BirthDate, …, Guest10Name, Guest10BirthDate}.
no when you design and code the form, you can have 10 containers, each one with the input elements for a single guest.
you then use collapse/expand logic to only show the right number of containers per the number of guests the user selected.
hope this points you in the right direction…
good luck!
Hi Ziv,
I am also trying to achieve the same outcome as above, I was wondering if you would be able to shine some more light on the code.
If I have put all the elements in for each participant, and collapsed them, how do I get the correct amount to show with the amount selected from the drop down number?
Thank you in advance
Stephen