How to create multiple, non-duplicate entries from one Form Submission

Hi. We have a need to allow parents to submit one form with some general info about the Parent, plus information about each of their children/students. When they choose the number of students (like 3), a new, second set of questions will appear (basic conditional logic) which we know how to do. The second set of questions is unique per student. Here’s our need… our administrators need the Entries (for exporting) to equal the number of students they select. So, if a parent named Mary fills out the form one time with 3 children’s info, the entries will total three rows/entries: 1) Mary’s general contact info + Student 1’s info, 2) Mary’s general contact info + Student 2’s info, and 3) Mary’s general contact info + Student 3’s info. Anyone know a way of doing this? Thanks

1 Like

Hi @icommllc

If I’m following you correctly, you are able to achieve the capture of the user’s input field data ok, but you seek a means to format the results in the manner you have described.

Would this work:

  1. Data is collected
  2. Submit button says “Review Your Answers” which they click
  3. They then see a Page/Form formatted with HTML populated with their info
  4. User clicks Submit to complete their session

If so, maybe my new plugin can help you. It enables the form designer to easily insert collected field input from other forms into HTML fields blocks (among other things) using merge tags which match the Admin Labels of the original fields.

For example, you’d have in an HTML field:

<td>Parent {mfsfs:info_parent_name}</td><td>Child 1 {mfsfs:info_kid1_name}</td>

Hi. Thanks, but that is not what I am trying. Just one form like normal, but getting the Entry to be more than one Entry, depending on the number of conditional fields that are completed (number of students). When a GF is submitted, by default one entry with all data is created. In my example I gave, it would be three entries with some common info for all three entries plus student specific fields.

OK, I understand your requirements better now.

Note, I’m far from being a GF expert, so it’s possible one more knowledgable will chime in eventually with a simple solution for you…

With WP and GF there’s always multiple ways to solve any problem, it’s just a matter of the level of effort, and in some cases involving some custom PHP code or plugin.

Regarding your use case…

Given that an entry post is created by a form submission action, your solution will require one such action for each child the parent is declaring… So if you can design a means to achieve that objective, you’ll be good to go.

One possible solution I can think of (which would not require any custom PHP code), would work something like this…

In the abstract, your user begins a session with a blank profile. Thru an iterative process, they build up their profile, adding each of their kids to the profile with a submit action, until they click the “profile complete” button to end the session.

With such an approach, you’ll have an entry for each of their “add a child to profile” mini-form they submit.

If this approach I am describing sounds promising, I can expound in greater detail how your page would need to be constructed.

You are also welcomed to check out Demo 2 and Demo 3 (link below) and see two examples using the MFSFS plugin collecting input data thru an iterative process.

FWIW, I’m just a paying GF customer like yourself, trying to be helpful :slight_smile:

Demos: https://wp.www-net.com

I encourage you to check out the perk GF Nested Forms by Gravity Wiz. This would allow you to use one form for receiving the parent submission and a second form nested within that one to receive the information for each child.

1 Like

Hi. I have used that perk before and thought of it, but it won’t do what we need. With Nested Forms, it is two different forms, which means two different areas for entries, which means the info for the Parent (before you get to the nested form) is not stored in the same entry as the Children/Student info (the nested form). The other thing I have noticed about that Perk is that people often submit for the nest form, but forget to submit on the main/primary form, so all we get is the nested data which is not enough for our needs. thanks for the idea though

1 Like

Yeah, I ran into that with one of my uses for the plugin, too. It is still in beta, so some of those things are being ironed out. There is a way to map fields from the parent form to fields on the nested form, but at the time I tried that, I think you had to have those fields in the parent form filled out prior to the nested entries being filled, otherwise, some ended up empty. Even so, when you get it just right, I think the perk is still a bit fragile. Hopefully it’ll keep getting more dependable for those more complex use-cases.

1 Like

@icommllc have you found any way to do what you were looking for? I’m looking for very similar functionality where a general form that is filled out by a parent and has a Nested Form to allow adding each of their children.

The general form has user registration set up to update the parent’s buddypress profile but the repeating fields are dynamic. It seems that any dynamic or repeating field isn’t totally supported in terms storing the data in the same form entry.

Anyways, I’d appreciate just hearing any of your solutions or ideas if you have any.

Can you articulate a bit more about why the parent and child entries being in separate forms is not a viable fit? If that is a hard-requirement, the list field with use of gform_column_input is likely to be a part of your solution. Or perhaps the (in-beta) repeater field

If the requirement could more widely be considered as “a single submission experience for the user that does not require re-entering parent data for each child” then along with GP’s Nested Forms, you might also want to look at the Gravity Flow Parent/Child Forms extension that I must say feels situationally perfectly named for this use case :slight_smile:

One last potential suggestion, that would be far more on the manual side of things, would be to present the parent a drop-down to select # of children up to a max, and then the conditional field display for section/page to duplicate the fields that you ask about each child.

Good luck,
Jamie

1 Like