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

    I need to create a redirect URL which includes variables in the address

    Asked by hilltopkennels on January 02, 2016 at 06:30 AM

    Ideally I'd like to create a URL from field values within a Jotform form, then use the created URL as a redirect, is this possible (I've shown sample field names in RED)?

    i.e. 

    https://secure-test.worldpay.com/wcc/purchase?InstId=123456&cartId=WorldPay+Test&amount=&{FullPayAmt}&currency=GBP&desc={BookingRef}&testMode=100

    Unfortunately my website host doesn't support PHP so I can't use the POST method.

    Thanks,

    Simon

     

    Page URL:
    http://www.jotform.com//?formID=60012523022939

    variables create redirect URL in
  • Profile Image
    JotForm Support

    Answered by Boris on January 02, 2016 at 11:28 AM

    Yes, you can definitely use the name of the field on your form as a value of URL parameters on the Thank You page. So the first thing you need to do is get the proper field names, which judging by the link you have provided in your example you already have:

    How to find Field IDs & Names

    When you have the names of your desired fields, which in your example seem to be {FullPayAmt} and {BookingRef}, you need to set your own custom URL as the Thank You page. The Thank You page URL is where the form will be redirected to upon submission:

    Setting Up the Thank You Page - part under "Redirect To Page (Custom URL)"

    So you can set your desired URL as the Thank You URL. As a demonstration, I have set it to http://example.com/?param1={fullName}&param2={email} in the following image:

    Upon submission, I was redirected to http://example.com/?param1=Boris%20Test&param2=support@jotform.com where Boris Test and support@jotform.com are values entered in those fields.

    There are three things I would like to point out though.

    1, you seem to have a superfluous & character separating the actual amount variable from the amount parameter in your example above. Please remove it, so that this:

    https://secure-test.worldpay.com/wcc/purchase?InstId=123456&cartId=WorldPay+Test&amount=&{FullPayAmt}&currency=GBP&desc={BookingRef}&testMode=100

    Becomes this:

    https://secure-test.worldpay.com/wcc/purchase?InstId=123456&cartId=WorldPay+Test&amount={FullPayAmt}&currency=GBP&desc={BookingRef}&testMode=100

    2, if any of the values are not correctly passed inside the URL, which usually happens only on Text Area fields and other fields where data is entered in multiple lines, you may need to use the URLENCODE option in your variables, such as this: {URLENCODE:BookingRef}

    How to Pass Values to the Text Area of a Form via URL encoding.

    3, in your example you seem to need to use + character as a space encoded character, while we pass space characters as an actual URI representation of a space character (%20) and not a plus character. Depending on how the custom URL parameters work on WorldPay, this may cause an issue to be aware of.

    Please test it out and let us know if you need any further assistance, we will be happy to help.