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

    How To Pull Page URL Through To Thankyou Page

    Asked by markashton on July 01, 2013 at 01:48 PM

    Hi,

    I have a requirement to pass the form url (which includes parameters) through to the Thankyou Page.

    Why? On clicking the form url on the Thankyou Page ... it will take one back to the form and pre-fill certain fields fresh for another go ;-)

    Is there anyway to pull the form url through to the Thankyou page? 

    (Note: Please don't advise on basic passing of parameters through a url - I know this stuff)

    Regards Mark

    page url fill parameters
  • Profile Image

    Answered by dinesh-it on July 01, 2013 at 02:32 PM

    Hi, If I understood your question Correct. Then, Yes. You can add the pre populated form URL in the thank you page.

    You have to use the field names of the form to the form url. You can get the field names using mail notifications.

     

    Use this name in the Form Prepopulation URL

    For eg:

    http://form.jotformpro.com/form/31654291007954?yourQuestion={yourQuestion}

     

    This is Form1. Feel free to do test Submission. And You can see that the message you entered in form 1 will be sent to Form2 using the link in the Thank you page of form 1.

    Hope this Solves your Problem.

    Feel free to ask if you need further clarification.

    Thank you.

  • Profile Image

    Answered by markashton on July 01, 2013 at 04:02 PM

    Thanks ... I know that much ... what I'm really asking is ...

    How do I pull the whole url through ... not just the variables?

    In your example ... Is there a way to pull the http://form.jotformpro.com/form/31654291007954 bit through as well - this will change to you see.

    Any way to pass the whole url of the page through?

  • Profile Image
    JotForm Support

    Answered by Mike_T on July 01, 2013 at 04:21 PM

    Could you please tell us how exactly it should work? Any examples would be appreciated.

    Please note that now we support field {tags} in form Thank You URLs. Would you like to use that option?

  • Profile Image

    Answered by markashton on July 01, 2013 at 05:19 PM

    Hi Mike ...

    This is what I've got on the thankyou page ...

    {url}?fullName[first]={fullName[first]}&fullName[last]={fullName[last]}

    where {url} is a hidden field with the default value set to the basic url of the form page - this comes through fine.

    The problem is that the name field values are not being pulled through ... the objective is that they would re-populate the full name field so the person doesn't have to type their name in again.

    Great idea ... 90% there ... can you see what I'm doing wrong? They should resolve as values shouldn't they?

    Thanks Mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 01, 2013 at 05:51 PM

    Hi Mark,

    I believe the separator to be used for the compound field like FullName should be a colon(:)

    like this 

    http://www.jotform.com/31814028580956?fullName[first]={fullName3:first}&fullName[last]={fullName3:last}

    I made a test form http://www.jotformpro.com/form/31816702701952, if you fill in the full name field, it should transfer the full name info to your form. 

    Hope this help. Please inform us if this is not what you were looking for.

    Thanks.

  • Profile Image

    Answered by markashton on July 02, 2013 at 07:11 AM

    Hi Jonathan,

    Thanks for the help ... still doesn't work though ...

    Check this form ... http://www.workflows.co.uk/wf-content/forms/test.htm

    Try a submission ... check where the links are pointing on the thankyou page ... there is some syntax problem with this:

    1) The field url is not being pulled through properly

    2) The fields are not being pulled through

    Nearly there. if you can help I'll love you forever ;-)

    Regards Mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 02, 2013 at 08:22 AM

    Hi Mark,

    I test submitted the form here http://www.workflows.co.uk/wf-content/forms/test.htm 

    The 1st URL link in the Thank you page results to Page not found. It means the URL is wrong.

     

     

    The URL was like this 

    http://www.workflows.co.uk/wf-content/forms/%7Burl%7D?fullName[first]={fullName3:first}&fullName[last]={fullName3:last}

    the encoded URL seems to be wrong.
    If you can let me see the correct URL of the target page with the form, I can do further test.

    Please try to make this page http://www.workflows.co.uk/wf-content/forms/%7Burl%7D? work first, and I will check again.

    Thanks.

  • Profile Image

    Answered by markashton on July 02, 2013 at 08:28 AM

    Hi Jonathan,

    Jotform is not pulling the default value of the field called {url} through properly:

    If you look at the form you will see that the default value of the field url is:

    http://www.workflows.co.uk/wf-content/forms/test.htm

    BUT ... jotform is pulling it through as this:

    http://www.workflows.co.uk/wf-content/forms/%7Burl%7D

    Why is it not passing through the value exactly as is?

    It is exchanging test.htm to %7Burl%7D

    Do you have a solution in mind for this nonsense ;-)

    Thanks mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 02, 2013 at 09:03 AM

    Thank you for clarifying Mark.

    I think I figured out the issue. In the url textbox, change the default value without the http://  like this

    www.workflows.co.uk/wf-content/forms/test.htm

    I cloned your form and use the same 'url' textbox in the custom URL TY page

    Here is the test form (just click on submit) http://www.jotformpro.com/form/31823673166962

    Please try. I think if you get this url working (even using hidden box), your idea should work.

    I will try to create an actual sample. I'll get back to you for it.

    Inform us if this work for you already too.

    Thanks.

  • Profile Image

    Answered by markashton on July 02, 2013 at 09:17 AM

    MMmm ... thanks for the effort but I'm afraid it doesn't work.

    Let's keep it simple for a second ... I have changed the http:// bit on the form ....

    http://www.workflows.co.uk/wf-content/forms/test.htm

    But I have also changed the link to this:

    <div style="text-align: center;"><a target="_blank" href="{url}" >Click here to return to diary</a>&nbsp;</div><br />

    Well if you do a submission you will see that {url} comes out as:

    http://www.workflows.co.uk/wf-content/forms/%7Burl%7D

    This is no good. Is there some kind of urlencode thing that would work?

    Thanks mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 02, 2013 at 09:42 AM

    Mark,

    In the html code, this part (red highlight) will not work.

    <div style="text-align: center;"><a target="_blank" href="{url}" >Click here to return to diary</a>&nbsp;</div><br />

    because the value for href is being read just as a string. Since you are using the html source code, you must actually assign the "url" value to a variable.

    You will need to use javascript to assign value to href from a variable.

    As you proven by this image

    the "{url}" here is actually a variable. This is why when using the custom URL TY page of the form, it work just fine.

    ---

    I think it is much easier if you just put the actual URL as a link in the Thank you page and just add the fullname parameter like this

    http://www.workflows.co.uk/wf-content/forms/test.htm?fullName3[first]={fullName3:first}&fullName3[last]={fullName3:last}

     

    Here is a test form http://www.jotformpro.com/form/31824224874961

    Thanks.

  • Profile Image

    Answered by markashton on July 02, 2013 at 12:20 PM

    The method you propose means all my clients must see a jotform submit page in the url bar. Not really what I want. The whole idea does work using the jotform thankyou page.

    My question is .. How do I get the variables passed through to a page that I am hosting ... how does the send post data thing work ? I have php enabled via my wordpress host

    Thanks Mark

  • Profile Image
    JotForm Support

    Answered by Welvin on July 02, 2013 at 02:05 PM

    Hi Mark,

    I'm not really sure if enabling Post Data will work or will solved the function that you'd like to have to your form. 

    Let us think of a possible workaround for this function. We'll get back to you later today.

     

    Thanks

  • Profile Image

    Answered by jeanettebmz on July 03, 2013 at 08:38 PM

    Hello Mark!

    You might probably would like to know that our team of developers have released Jotform Webhooks, please find out about it here

    Cheers!

  • Profile Image

    Answered by markashton on July 04, 2013 at 05:46 AM

    Hi Jeanette,

    Thanks for that. Yes this looks very close to what I'm after doesn't it.

    I get how the webhooks function could be used to pump submission data to a database ... makes sense ;-)

    For my requirement ... I'd be very grateful if you could give me a lead on this ....

    How could I use the webhooks function to post submission data to a pre-formatted Thankyou Page on my domain?

    Would I just set the thankyou page custom url and the webhooks url to point to the same page?

    Gotta be php ?

    Many thanks for your help

    Regards Mark

  • Profile Image

    Answered by jeanettebmz on July 04, 2013 at 11:59 AM

    We recommend PHP yes.

    You don't have to use both methods. This feature replaces Send Post Data+ Custom URL Thank You page.Just paste the web URL for your PHP script there.

    Our developers hope to have a variety of integrations and apps built on top of Jotform API, Webhooks will be  a key in all of this.

  • Profile Image

    Answered by markashton on July 04, 2013 at 12:29 PM

    That doesn't look right ... what you are saying ... exactly by your words is this ....

    Don't bother with Send Post Data + Custom URL ... just paste the web url in the webhooks.

    Not possible ... try removing the custom url ... as you suggest it is not needed ... asks for it again with a big red error

    ---------------

    Look I don't expect you to do all my work for me but this is ambiguous ... could you please show me a pretend little form that posts data to a thankyou page on anopther domain ... that uses the web hook function ... and I will post it for evgeryone to make use of.

    Would that be OK please?

    Regards Mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 04, 2013 at 03:31 PM

    @markashton

    Hi, please check this form http://www.jotformpro.com/form/30057194016952 

    I used this guide Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page (the 2nd part)

    The Custom Thank You URL is this http://batangas-ventures.com/jotform/testusers/php/redirect.php

     

    The redirect.php page have this code

     

    <?php

    $answers = $_POST;

    $url1 = "https://shots.jotform.com/jonathan/webtest/Collect-Data-From-Submissions-Using-Post-Request.html";

    $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");

    ?>

     

    As you can see the "other domain" page/url was this 

    https://shots.jotform.com/jonathan/webtest/Collect-Data-From-Submissions-Using-Post-Request.html

    If you test the form http://www.jotformpro.com/form/30057194016952 , the data will be posted to the target custom html page 

    ---

    May I suggest we create a separate thread on the Webhooks inquiry. Please use this link http://api.jotform.com/docs/#contact

    Just to give you a quick idea on Webhooks, please check it using the test console here

    http://api.jotform.com/docs/#post-form-id-webhooks

    1. Use your API key.

    2. Enable Webhooks in your test form

    3. You can use this URL as your webhookURL http://requestb.in/uyv7mcuy

    --

    Hope this help. Please contact us again anytime for any assistance needed.

    Thanks.

     

     

  • Profile Image

    Answered by markashton on July 05, 2013 at 08:11 AM

    Hi,

    Using Post Data ..
    Redirect.php file thing going on to custom thankyou page on my domain
    Values passing through url fine ...

    I'm trying to pass the value from a url into a text string on the Thankyou page

    e.g. Thanks {firstName} 

    This doesn't work ... I would like it to work just like Jotform's custom Thankyou page 

    Am I missing something? I think the html isn't correct on my page.

    Can anyone advise I'd be grateful

    Thanks Mark

  • Profile Image
    JotForm Support

    Answered by jonathan on July 05, 2013 at 02:32 PM

    Hi Mark,

    Please try test this form http://www.jotformpro.com/form/31845261280956

    Fill in the Full Name as required and submit. 
    It should send and post the data to a custom page.

    This one https://shots.jotform.com/jonathan/webtest/Read-Data-From-Submissions-Using-Post-Request.php

     

    The custom page(php) contains this code http://pastie.org/8113417#11 (just to give you idea on how I pass the POST data to a string variable)

    Hope this help. Please inform us if you have further inquiry on this.

    Thanks.