Hello dear community! I am trying to create a pop-up for data input, where users can list ‘number of passengers’. The value of this input should be between 1 and the maximum number of ‘available seats’ (all stored under one dedicated data type).
I then display a repeating group, where the user should input passenger data for each passenger specified. How do I set the number of rows in the repeating group to dynamically reflect the number of passengers in the input textbox?
What would be the best way of storing data for multiple passengers (I expect the number of passengers to range from 1-6, and need to store three data points for each passenger).
But in your case, I may suggest another simpler way. Instead of asking for the number of passengers just like that. Show an Add passenger button. With the button press, add a passenger to the database with empty fields, and let the user fill these and they can add another passenger if they want.
See the demo below:
Simply, the button creates a passenger immediately:
Then, the repeating group shows all the passengers in the system (or in your trip?):