JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Can we get data from one submission and use it to create 3 similar ones in our DB?Asked by Mike Collins on August 18, 2015 at 04:56 PM
In this scenario, is there a way to generate a form submission based on the number of items are repeated. I want a new form submission with all the parent\surrounding data duplicated.
So if someone added 4 players at one registration I want 4 records on my spreadsheet with each one containing the parent info.
If I understood you correctly Mike, you are looking to have the details about the players repeated as empty fields to fill out, but the details of the parents / surroundings repeated for each?
Can you please confirm if that is so and if you could tell us a bit more about what you are trying to accomplish - that will help us understand and offer the best approach to what you are trying to achieve.
I want a new record for each player, but I only want the user to enter the parent info once. Then my spreadsheet is ready to go - one line per player.
Since you say Mike that you already have the spreadsheet finished, then this app might be worth inspecting: Spread2Jot
It will basically recreate the form based on the columns in your spreadsheet.
Now since that might help you set it all up at first, there is still a question of how you want to present the fields.
Based on what you have mentioned, you could have textboxes at the top that accept the details that should not be repeated and then have Configurable List or other set of fields (that will be repeated) under it.
On the other hand, it sounds that you would like to have the parent fields repeated, just filled out as the first fields get filled out.
If so, I would suggest just adding Form Calculation widgets and naming them as the fields that they would be repeating.
Then just go into each and set the form calculation to capture the text of that specific field.
When you do that, you should just click on the field representation (click on the numbers in the corner to have it shown as black) to have it load into it as text only.
You could also just pass the values over to other textbox fields using conditions as shown here: How to Insert Text or Mathematical Caculation into a field using a Condition
I think you are giving me some good tips, not sure it gives me 3 rows in my google drive spreadsheet though.
So if I have all the form items calculated for each player, how does JotForm create 3 form submissions off one form? Or however many players , parents might be signing up.
Go to fibaseball.com and look at my Register buttons and you will see what I am talking about.
When I get 1,2,3 players I create 3 database records reusing the parent info.
OK, I understand now what you mean Mike.
There are two ways to achieve this depending on how you want it to be done.
1st is to create a single form, and on its submission (if they select to add more players) they are taken to that same form, but at this time the parent and other details are passed over and shown (could even be disabled from edits).
This utilizes single form with URL prepopulating: Prepopulating fields to your JotForm via URL parameters and redirection: Configuring Change Thank You URL after submission condition
The other way is to use WebHooks to capture the data submitted on a single form and then pass it over to several rows of your spreadsheet.
You can see more about the WebHooks here: How to Setup Webhook with JotForm
I would however recommend using the first option.
Other than this, would be to accept the submitted data into a single row in a spreadsheet and then do a different kind of parsing (from a single row instead of multiple ones).