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

    Prepopulating form fields with data containing "+" sign does not work

    Asked by timetric on June 29, 2015 at 10:10 AM

    Using the technique on http://www.jotform.com/help/71-Prepopulating-fields-to-your-JotForm-via-URL-parameters I am trying to prepopulate some fields on my forms.
    Some of these fields are phone numbers in international form, eg +44 1234 567890

    However, when I encode these like so;

    http://form.jotformeu.com/form/FORMID?telephoneNumber=%2B441234567890

    the "+" sign never appears. It seems to work fine with any other special character I use, but the plus sign is swallowed/turned into a space.

    Toby

    does not work prepopulating form work My Forms JotForm parameters
  • Profile Image
    JotForm Support

    Answered by Mike_G on June 29, 2015 at 01:02 PM

    I can see what you mean as I have reproduced the issue. Normally, the "%2B" should be working, but it is not. I will forward this to our developers for them to take a look at it. I would like to apologize for the inconvenience. You will be receiving updates regarding this concern via this thread. Thank you. 

  • Profile Image

    Answered by timetric on June 30, 2015 at 07:06 AM

    Thanks. It would be good to understand if this will be solved in the next day or two: this is the only blocker to me paying for a full account for a campaign we need to run.

    Thanks,

    Toby

  • Profile Image

    Answered by AaronSiciliano on June 30, 2015 at 11:03 AM

    Hello timetric,

     

    This appears to be intended behavior for the script. It parses the symbol and replaces it with a space. I am not personally aware of the reason the plus symbol is not allowed in the url prepopulating form script but the developer confirmed that it is operating as intended.

     

    Thanks,

    Aaron

  • Profile Image

    Answered by timetric on June 30, 2015 at 11:08 AM

    Ok - so what is the recommended way to prepopulate the form with data including a "+" sign?

     

    I don't think this is a particularly weird thing to do - as in my example, it's the standard way to do international phone numbers, which are a fairly common thing to put in a form field.

     

    Toby

  • Profile Image

    Answered by Sammy on June 30, 2015 at 01:20 PM

    Hi Toby,

    As a workaround you can pass the number to a hidden field without a plus then use condition to update the phone field with the hidden value while appending the +sign in the condition evaluator.

    A point to note, when addint the plus symbol do not type it directly it will be evaluated to a mathematical operation instead add it within single quotes '+'  then remove the quotes one at a time that way the symbol will remain as text.

     

     

     

    Kindly revert back with your results.

     

  • Profile Image

    Answered by timetric on July 01, 2015 at 11:22 AM

    Thanks for this response. I think this would work for the simple phone number case. This might be enough to get me going for the time being.

     

    Unfortunately it is not a complete solution; some of my telephone field data uses parentheses around the international code - eg "(+44) 1234 567890" - and there is no clear condition I can write that will work universally.

     

    I would very much rather have the prepopulated field feature working straightforwardly as documented on this one - it would make my life much easier in the future.

     

    If it helps your developer; I do understand that "+" signs have a special meaning in URLs, and I can understand why this feature works as it does currently. However, your service works correctly work with an escaped ampersand (%26) or an escaped hash (%23) - this already makes you better than Wufoo! - it should be possible to read "%2B" and convert it to a "+" in the context of the page - *without* also converting it through to a space.

  • Profile Image
    JotForm Support

    Answered by Mike_G on July 01, 2015 at 01:55 PM

    How would you like to consider using the Phone Number field instead of a normal text box field to collect phone numbers?

    Adding Phone Number field doesn't include Country Code field automatically, but you can add it through its Properties.

    This would also allow submitters to easily identify what you want for them to enter. 

    Then, pass the value of each field of the Phone Number field to another form via URL using the Thank You page Wizard Custom URL option.

    Here's a sample URL:

    http://FORM URL HERE?countryCode={phoneNumber:country}&areaCode={phoneNumber:area}&phoneNumber={phoneNumber:phone}

    Note: countryCode, areaCode and phoneNumber are field names of the second form.

    {phoneNumber:country}, {phoneNumber:area} and {phoneNumber:phone} are separated values of the Phone Number field of the first form.

    On the other form,

    You need to have fields that will collect each value. And these fields should be hidden. 

    Then, create your condition: 

    As for the result:

    Even if submitters enters the Country Code as (789), +789, (+789) or just 789 it will still have the same result. 

    By the way, here are the two sample form I have used, please feel free to clone it for your reference.

    FORM 1: http://form.jotformpro.com/form/51794542211957

    FORM 2: http://form.jotformpro.com/form/51794945050965

    I hope this helps. Let us know if you need any further assistance. Thank you. 

  • Profile Image

    Answered by digitalbridge on February 23, 2016 at 11:03 AM

    hi,

    not sure if it is ok to respond to this or if I should open a new discussion. How would something like this work with email addresses? Sometimes people will use a + at the end of their email address to filter mail (ie: example+jotform@example.com). We can't really use your hidden field trick for this and it's crucial that  we correct the correct email. Have there been any process changes on this?

     

    Thanks