-
MitutoyoAsked on January 7, 2016 at 4:02 PM
Is it possible to take in formation from a registration page and use this to identify a user who simply clicks on a "contact me" button located on a thank you page?
-
Chriistian Jotform SupportReplied on January 7, 2016 at 9:58 PM
Hi,
You can store a field variable in a session by choosing a field from the Form Fields dropdown menu.
Then add the form field in the link for your button. For example, here I made a link that sends the Full Name from the form to a session.
As you can see below, I added the ?session={fullName} in the URL.
For more information in editing a Thank You page, you can check out this guide: Setting Up the Thank You Page
Do inform us if you need further assistance,
Regards. -
MitutoyoReplied on February 3, 2016 at 2:46 PMChristian,
I’m trying to use the example from page to post data from form one to pre-populate fields on form two.
According to this page, I need to place the following PHP code on the second form to make this work. My question is, how do I edit the form to place this PHP code?
<?php
$answers = $_POST;
$url1 = "http://mehmetozdemir.esy.es/tesekkur.html"; // This is the URL address of the Form
$var1 = "?fullName3[first]=".urlencode($answers[fullname3][0]);
$var2 = "&fullName3[last]=".urlencode($answers[fullname3][1]);
$var3 = "&email4=".urlencode($answers[email4]);
$var4 = "&comments=".urldecode($answers[comments]);
$url2 = $url1.$var1.$var2.$var3.$var4;
header("location:$url2");
?>
Shaun
Shaun A. Pollitt
New Media Development Coordinator
Mitutoyo America Corporation
965 Corporate Boulevard
Aurora, Illinois 60502
Direct: 630-723-3625
www.mitutoyo.com
... -
BorisReplied on February 3, 2016 at 5:51 PM
You do not need PHP codes in order to prepopulate fields on a form, and furthermore you cannot even add any PHP or JavaScript codes directly to your JotForm form for security reasons.
What you can do is very simple - you can prepopulate fields on your contact form directly with URL parameters, no PHP coding required. Please take a look at our guide: Prepopulating fields to your JotForm via URL parameters.
If you let us know which of your forms is the Contact Form you would like to be prepopulated when your users submit your initial form, and which will be that initial form, we will be happy to help you set up the URL parameters in such a way that fields from the first form are sent to the second form.
-
MitutoyoReplied on February 4, 2016 at 12:46 PMThank you, I would love some help with this.
First form: https://form.jotform.com/53556635465969
Second form: https://form.jotform.com/60344226803954
The second form, my “thank you” page from form one, has two hidden fields which I would like populated by the first form.
Shaun
Shaun A. Pollitt
New Media Development Coordinator
Mitutoyo America Corporation
965 Corporate Boulevard
Aurora, Illinois 60502
Direct: 630-723-3625
www.mitutoyo.com
... -
victorReplied on February 4, 2016 at 2:37 PM
I have just verified your first form and noticed that you have adjusted the thank you URL
Can you please indicate if you are having issue populating this fields into your second form?
-
MitutoyoReplied on February 4, 2016 at 3:45 PMI tried the form but it didn’t populate the next form.
Shaun
Shaun A. Pollitt
New Media Development Coordinator
Mitutoyo America Corporation
965 Corporate Boulevard
Aurora, Illinois 60502
Direct: 630-723-3625
www.mitutoyo.com
... -
BorisReplied on February 4, 2016 at 5:00 PM
I see that the link you are using is:
https://form.jotform.com/60344226803954?fullName[first]&fullName[last]&email
It does not yet contain the values in the URL parameters, it only has their names. Please adjust your Thank You link into this:
https://form.jotform.com/60344226803954?fullName[first]={fullName:first}&fullName[last]={fullName:last}&email={email}
Please let us know if it works correctly after that. :)
-
MitutoyoReplied on February 4, 2016 at 5:46 PMBoris,
Thank you, I just figured this out about the same time you responded. It’s working now.
Shaun
Shaun A. Pollitt
New Media Development Coordinator
Mitutoyo America Corporation
965 Corporate Boulevard
Aurora, Illinois 60502
Direct: 630-723-3625
www.mitutoyo.com
...