Things that will blow up a pre-populating URL

  • Profile Image
    jtheroux 
    Asked on March 23, 2020 at 09:24 PM

    Hi!  Now that I've figured out a "?" in a text box field (when someone replies to the form and asks a question) will blow up a pre-populating URL, I have other questions.  

    1. What would stop a dropdown field from pre-populating the next form? I finally have data passing from one form to the next (when I don't use a ? in my previous test response!!! *facepalm*) with the exception of a drop down field type.  These are the options in the uncooperative field (I think I know the answer - the ampersand):

    ACTIVE MIND & BODY
    ARTS & CRAFTS
    ARTS-VISUAL & PERFORMING
    COMPUTER & TECHNOLOGY
    FINANCE, ECONOMICS, & LAW
    HEALTH & NUTRITION
    HISTORY & CURRENT AFFAIRS
    LOCAL INTEREST
    NATURE & THE OUTDOORS
    PHILOSOPHY & RELIGION & UNEXPLAINED
    SCIENCE & MATH
    SELF-ENRICHMENT & LIFESTYLE
    SOCIAL SECURITY & MEDICARE
    TRAVEL
    WRITING, LITERATURE, & LANGUAGES
    OTHER

    How do I work around this since I want the ampersand in the list.  BTW, I don't know how to code.


    2. Are there other landmines about which I should be aware for pre-populating forms?

  • Profile Image
    EltonCris
    Answered on March 23, 2020 at 11:48 PM

    You need to encode the symbol so it would not break the URL. & is %26

    Use this link to encode symbols https://urldecode.org/.

    Example:

    https://form.jotform.com/200829324395054?testA=A%20%26%20B&testB=C%20%26%20D

    %20 is a single whitespace

    %26 is the ampersand &

    If you're using field tags insert URLENCODE in it. Example, if the field tag is {name} it becomes:

    {URLENCODE:name}

    When prepopulating forms via URL parameters, you just have to follow the query string format. Please refer to our guide here http://www.jotform.com/help/71-Prepopulating-the-fields-to-your-JotForm-via-URL-parameters.