Cognito Forms offers repeating sections, which are groups of form fields that can be duplicated as necessary. You only set up the fields once, and all your customers will see is one section - until they click "Add Attendee", "Add Car" or "Add" anything else, allowing you to collect as much or as little data as your customers can give.
Using Microsoft Flow, you can build a flow that creates new entries in one form based on the repeating section data in another form. In this example, we’ll be using two forms: a camp registration form, and a camper directory.
Here’s how it works:
- The camp registration form collects emergency contact information and a registration fee from the person filling out the form. It also contains a repeating section labelled ‘Campers’ for them to list the name, age, and other details for each camper they want to register.
- Upon submitting the registration form, our flow will create separate entries in the camper directory form for each registered camper. With each camper separated by entry, you have the ability to sort and filter the camper information based on age, camp session, etc.
Building the flow
Once logged in to Microsoft Flow, go ahead and select Create from blank to start building your flow from scratch. First, we’ll need to set the trigger:
Begin by selecting Cognito Forms as the connector and When a new entry is created as the trigger. Then, we’ll select our Camp Registration form.
Next, click the New step button, and select Add an action.
Select Cognito Forms as the connector, set Create entry as the action, and select the camper directory form (ours is named Campers). Now, we can specify the field data from the repeating section on the camp registration form (camper’s name, address, age, etc) that will populate the new entries in the camper directory.
At this point, the Apply to each box will appear around the action. The Apply to each option effectively loops through an array of items (in this case, a repeating section), and applies those actions to each one. This action ensures that the information from each repeating section in the registration form will become a separate entry in the camper directory.
Once we finish specifying all the necessary field data, we’re done! Make sure to select Create flow at the top of the page.
Test it out!
If we submit the camp registration form and register two campers, the camper directory form will receive two new entries containing the camper information:
Now, we can use the Filter option on the Entries page to filter the data based on specific criteria, like which session a camper is attending:
Have any questions about integrating your forms with Microsoft Flow? Feel free to get in touch with us, or just leave a comment below!