Create dynamic "contact me" button on thank you page

  • Mitutoyo
    Asked 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 Support
    Replied 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.

    Create dynamic contact me button on thank you page Image 1 Screenshot 40

    As you can see below, I added the ?session={fullName} in the URL.

    Create dynamic contact me button on thank you page Image 2 Screenshot 51

    Create dynamic contact me button on thank you page Image 3 Screenshot 62

     

    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.

  • Mitutoyo
    Replied on February 3, 2016 at 2: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
    ...
  • Boris
    Replied 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.

  • Mitutoyo
    Replied on February 4, 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
    ...
  • victor
    Replied 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

    Create dynamic contact me button on thank you page Image 1 Screenshot 20

    Can you please indicate if you are having issue populating this fields into your second form?

  • Mitutoyo
    Replied on February 4, 2016 at 3: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
    ...
  • Boris
    Replied 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}

    Create dynamic contact me button on thank you page Image 1 Screenshot 30

    Create dynamic contact me button on thank you page Image 2 Screenshot 41

    Please let us know if it works correctly after that. :)

  • Mitutoyo
    Replied on February 4, 2016 at 5: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
    ...