How to handle spaces in URL properly?

  • jjones2
    Asked on December 11, 2017 at 10:11 AM

    I have a funding application that uses a two part “Save and Continue Later” setup.

    Users start on the New Application Page: https://form.jotform.com/63426631948160

     

    When they hit submit, their project specific URL is created using Session ID and Project Name.

    Project Application: https://form.jotform.com/63436424754156?session={id}{projectName}

     

    They would redirected to a Thank You Page where they would click through to the second part of the application which is updated using URL parameters.

    Thank You Link:

    https://form.jotform.com/63436424754156?session={id}{projectName}&contactPerson[first]={contactName:first}&contactPerson[last]={contactName:last}&fullLegal4={organizationName}&nameOf={projectName}&email={email}

     

    They would also be sent an email link without URL parameters for future use.

    Email Link: https://form.jotform.com/63436424754156?session={id}{projectName}

     

    Unfortunately, the Thank You Link and the Email Link do not point to the same application.

    When the {projectName} is encoded in the Thank You Link, any spaces in the project name are converted to ‘+’. When {projectName} is encoded in the Email Link, spaces become ‘%20’.


    Is it possible to make both links use the same characters to encode space?

  • Nik_C
    Replied on December 11, 2017 at 11:44 AM

    I tried to check this issue, but when I checked both of your forms, I couldn't see custom Thank you page. 

    I see that you're creating the Custom link in Autoresponder email (which looks fine):

    1513010622Screen Shot 2017 12 11 at 5 Screenshot 10

    Did you remove that link from that Thank you page or did I oversaw it since I wasn't able to compare the two?

    Thank you!

  • jjones2
    Replied on December 11, 2017 at 12:02 PM

    Yes, I removed the link while troubleshooting, but have recreated the issue on: 

    https://form.jotform.com/63367006407150

    The Thank You Page generates the following: 

    https://form.jotform.com/63367006407150?session=3888204364508006924Project+Name

    And the Auto-responder Email creates:

    https://form.jotform.com/63367006407150?session=3888204364508006924Project%20Name

    Is there any way to format both the same way?

  • jjones2
    Replied on December 11, 2017 at 12:19 PM

    It looks like {URLENCODE:projectName} will force both links into the %20 format.

    Other suggestions are welcome. Thanks! 

  • Nik_C
    Replied on December 11, 2017 at 1:19 PM

     I'm still unable to check and test this issue since this the Thank you page is not including that link:

    1513016141Screen Shot 2017 12 11 at 7 Screenshot 10

    And the Notifier and Autoresponder aren't as well:

    1513016171Screen Shot 2017 12 11 at 7 Screenshot 21


    1513016229Screen Shot 2017 12 11 at 7 Screenshot 32

    Could you please point us where the links are or to some other form so we can check this issue further.

    Thank you!

  • jjones2
    Replied on December 11, 2017 at 2:21 PM

    The links that I sent earlier were clones of the form below. Once I resolved the issue, I updated the original and deleted the clones:

    https://form.jotform.com/73376488349170

    Sorry for the confusion.

    This form's Thank You Page and Auto Responder 1 contain links using the URLENCODE. Is there documentation available for other methods like URLENCODE?

    Thanks!

  • jonathan
    Replied on December 11, 2017 at 3:04 PM

    I think the documentation you were looking for were these

    1. Pass Value to Another Form with URL Encoding

    2. How to Automatically Pass Form Data to Another Form

    3. Prepopulating Fields to Your JotForm via URL Parameters


    All 3 user guides mentioned URL encoding use in form.

    I hope this help. Let us know if you need further assistance.