What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
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.
Automatically prepopulating form based on another formAsked by lastfrontierheli on May 02, 2013 at 01:29 PM
Could you please explain "$var1 = "?fullName3[first]=".urlencode($answers[fullname3]);"
Is "fullName3[first]" the id of the initial form and "[fullname3]" the ID of the the field in the second form that should be pre-populated?
My first form has the First name and Last name as simple text fields, and the second form (that I want populated with the names from the first form) has them in the "Full Name" format, could this be causing an issue? (I have the email pre-populating fine, but the names are not. If I understood what is being referenced by the redirect.php code (is it the field ID, name etc) I would be able to figure out my issue.
Any help would be greatly appreciated!
I forgot to include the forms:
I want the fields from this form:
To populate this form:
This is a re-post of a comment on Send Submission Data via POST Method Using PHP and the Thank You Settings
Thank you for contacting us.
You can try the following code:
$answers = $_POST;
$url1 = "http://form.jotformpro.com/form/30999279639982";
$var1 = "?fullName1[first]=".urlencode($answers[firstname]);
$var2 = "&fullName1[last]=".urlencode($answers[lastname]);
$var3 = "&email3=".urlencode($answers[email]);
$url2 = $url1.$var1.$var2.$var3;
fullName1[first] - is referring to the First Name input on your second form.
$answers[firstname] - is referring to the post data from your first form.
You can also run the following script instead of the redirect code in order to see the full post data array:
If something is not clear, please let us know. We will be happy to help.