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.


  • Profile Image

    Create dynamic "contact me" button on thank you page

    Asked by Mitutoyo on January 07, 2016 at 04: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?

    create thank use first form second form URL prepopulate URL parameters prepopulate
  • Profile Image
    JotForm Support

    Answered by Chriistian on January 07, 2016 at 09: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.

  • Profile Image

    Answered by Mitutoyo on February 03, 2016 at 02:46 PM
    Christian,
    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
    ...
  • Profile Image
    JotForm Support

    Answered by Boris on February 03, 2016 at 05: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.

  • Profile Image

    Answered by Mitutoyo on February 04, 2016 at 12:46 PM
    Thank 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
    ...
  • Profile Image

    Answered by victor on February 04, 2016 at 02: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?

  • Profile Image

    Answered by Mitutoyo on February 04, 2016 at 03:45 PM
    I 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
    ...
  • Profile Image
    JotForm Support

    Answered by Boris on February 04, 2016 at 05: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. :)

  • Profile Image

    Answered by Mitutoyo on February 04, 2016 at 05:46 PM
    Boris,
    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
    ...