Reservation, personal information with repeater?

Hi there, I’m working on a complex reservation form.
Im creating a reservation form for a tour, each tour comes with specific excursions.

If you want to make a reservation (you don’t need to pay, just the reservation only), you have to select with how many people you will join the tour. For every person I need the personal information like date of birth etc etc… But also, per person I need to know what specific excursions they want to do.

The list of excursions is dynamic, and based on the tour itself. What Im planning to do:

  1. Create a multipage form.
  2. Page 2 will be empty.
  3. Trough code add the repeater option for the personal information. But show the amount of information based on the number of persons that is entered. So not showing a add person button instead.
  4. Also inside the repeater option, fetch data from the tour itself to update the multiple select options. (also trough code).

Is this something that is realistic to do this way?

With kind regards.

List item

I found a way of showing the excursions for the specific tour. With pre_render.
However when I add a repeater field now, it always adds it to my last page of the form…

Also, is it possible to let the repeater field already show X fields, instead of the user to click on the button to add an extra field?

Repeater fields are still in beta stage, so it’s not recommended to use them for production. Also note that due to its beta stage it has some limitations, for example dynamic population and conditional logic are not supported. Also setting a specific number of fields to show is not a feature either, the purpose of using repeater fields is to let the user decide when to add another set of fields, the only thing you could do it is to set a ‘maxItems’ value to limit the maximum, but there’s no parameter to display a minimum.

So if your form has a field to select the number of persons, I would recommend you to just pre-create as many fields as you may need, and configure conditional logic for them to show/hide each set of fields based on the number selected by the user, this would allow you to avoid using a beta feature that doesn’t seem to be designed for your use case.

Another approach could be using the following third-party add-on created by one of our certified developers: Gravity Forms Nested Forms | Gravity Forms Repeater Add-on | Gravity Wiz

Hi Roderick,

The repeater field is robust, but as @sacom mentions there are some limitations that come with it in addition to still being beta. Another add-on you may want to consider is Gravity Flow’s Parent/Child extension. In addition to using a separate form to design the details you need for each person, you could have a notification use a merge tag in the format to have the individuals fill out their own info. Our setup guide for the extension has some more info and examples.

If your initial form has a number field for the planned # of attendees, you should be able to use both gform_field_validation and the dynamic field population to control what options appear in the dropdown of the child forms.

Hope that helps,

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.