Creating dynamic guest registration form

Hello, I am stuck with implementing RG in RG form guest registration.
This solution seems similar but can’t set up everything and thinking that I am missing something

The general idea - guest comes to the form in which he has to enter how many guests will arrive, press next and in the next stage guest should have as many guest cards as entered before with input fields like name, date of birth day, passport ID, etc. and navigation between them in one page. Only after entering all details these cards should be save to database as one reservation with list of guests. Additional question - how to extract this guest list to show for the user (one reservation and list with details). Thanks in advance for any advice

on the next button run a backend workflow to create the guest positions

run workflow on list of numbers (can use the list of numbers plugin)
or run recursive workflow that reschedules itself up to the guest number

alternatively change the form design to have the user add/remove each guest individually and then just show the total guest count

data structure is likely
reservation
reservation_guest

if events are large with hundreds of guests then I’d store the event on the guest and do a search for guests.
if events are small with under a hundred guests I would store the guests on the event

if the guests are not accessed regularly then I may not bother with storing a list of them on the event

to show the list you’d either do
search for reservation_guests where reservation is current reservation
or
this reservations guests

depending on how you structured it

Thank you for quick response @mitchbaylis

I am trying to do this but somewhere I miss something
Ntis is data type in which guest info will be stored, and this info will be available in reservations - I was trying to create in backend empty table with data fields, put it in the custom state and in front end bond these fields but with no success… maybe you have some ideas?


Guest will come just one time to fill data and later only hotel will use it for storing with each reservation so it seems I need to store guests on a list or what do you think?
This is one part - other part in which I am getting confused is how to set up nested RG to be able to navigate during data filling process and later save according to index.
Really appreciate any insight on this, already stuck long time and don’t know maybe just main set up is not correct…

you won’t be able to get it saved as a state but you can just search for the data or save it on another data to access it. bubble will return it as soon as it is created which will be fairly instantly.

when you create the data add the parents data to it so you can search for it on the page

ie the page has data “reservation” therefore write that reservation to each guest and then on the page just search for guests with the reservation (or add the guest to the reservation as a list)

Thanks @mitchbaylis for insights, few more questions

I was thinking that it is possible to set a state as a list with data type fields (different field types) and later save each input to state’s list based on data field and index and only at the final step save it to database - this is not technically possible or to complicated and easier approach is better?

Could you give a bit more details? i am always confused with bonding data :smile:

As I understand I don’t need to use nested RG (Outer repeating group data source listofnumbers and inner repeating group for reservations? In this a bit lost :slight_smile:

if you create the data in the backend then it’s a bit tricky to get it to save on a state in the front end

you can create and save on a state in front end
user can plus each item to a list
or
use a plugin to create and add to a list on front end

if page data is reservation then you just need 1 repeating group on the page to show the guests

the source of the repeating group data is either
search for guests where reservation is pages reservation
or
pages reservations guests list

depending on how it’s stored

Thanks @mitchbaylis. Maybe I was too focused to create data in the backend and show to the guest in frontend without saving anything on database before final submit.

I use toolbox listofnumbers to create a list but a bit confused how to show lets say 4 empty form to the guest to fill it inside RG if I make data source reservations (like page data) and not listofnumbers list as data source (to navigate between forms) - or I am not catching something here? :thinking:

And maybe a bit about database - so reservations data type has a field guest list (as list), also separate data type for guests (all necessary details to collect). In order to create empty forms I need to create entry to reservations and put all guests info into list - here maybe question about mapping different type of fields from guests to one guest list? Or all the fields in guest data type should be as list (list of first names, list of last names, etc.)

This topic was automatically closed after 70 days. New replies are no longer allowed.