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 can you dynamically prepopulate a URL with responses to checkboxes

    Asked by foodzooka on August 12, 2012 at 08:15 PM

    How can you dynamically prepopulate a URL with responses to checkboxes and dropdowns?



    This is a re-post of a comment on Prepopulating Fields to Your JotForm via URL Parameters

  • Profile Image
    JotForm Support

    Answered by idarktech on August 12, 2012 at 08:50 PM

    Hi,

    Same as the text boxes, just get the check box name and add the check box values. Example, in this form:

    http://form.jotform.me/form/22247423105443?

    Checkbox name:

    mobileBrands[]

    Values are:

    Nokia

    Samsung

    Motorola

    iPhone

    To contruct the URL:

    http://form.jotform.me/form/22247423105443?mobileBrands[]=Nokia,Samsung,Motorola,iPhone

    Just separate the values using comma "," and don't forget to use ampersand "&" if you wish to prepopulate all fields. You can do the same for drop down field.

    Check this Example:

    http://form.jotform.me/form/22247423105443?mobileBrands[]=Nokia,Samsung,Motorola,iPhone&mobileOs=Android

    Please watch carefully the symbols used. Thank you.

  • Profile Image

    Answered by foodzooka on August 12, 2012 at 09:00 PM

    How would I dynamically prepopulate based on previously submitted data, similar to this question but specifically for checkboxes and dropdowns?:

    http://www.jotform.com/answers/93645-How-do-I-prepopulate-based-on-data-that-the-user-submitted-from-another#4

    I've tried using using this method for all fields, but the data for checkboxes and dropdowns does not show up.

  • Profile Image
    JotForm Support

    Answered by idarktech on August 12, 2012 at 09:20 PM

    Hello,

    Thanks for your prompt response.

    I think I've found the problem with check boxes. When you select multiple answer with check boxes the values wont be separated by commas automatically instead it uses <br> code on the URL paramater and this is the reason why it won't work.

    Try to submit using this form but first select single value on check box, it should work. But, when you select multiple choices it wont: http://form.jotform.me/form/22247423105443, prepopulation URL can be seen on thank you page.

    I will now submit this to our developers so they can further investigate this problem. I can't give you a definite time up to when this will be fixed but rest assured they'll work into this. We'll just update you if there's any progress on this.

    Thanks and have a pleasant day!

  • Profile Image

    Answered by foodzooka on August 12, 2012 at 09:45 PM

    Yes, I tried adding URLENCODE as described here: http://www.jotform.com/help/164-URL-encoding-your-submission, but it coded with spaces instead of commas. If if I manually replaced the resulting URLs with commas, it worked fine. I just don't know how to get it to use commas dynamically! 

    It looks like your dropdown works properly to pass the correct parameter to the URL. Can you specify the code you used for the dynamic URL? 

  • Profile Image
    JotForm Support

    Answered by idarktech on August 12, 2012 at 09:53 PM

    Hi,

    I guess that won't help. Don't you worry as I have already submitted this issue to our development team. We'll just update you via this thread if we received any informations from them.

    Thank you once again for reporting. Have a pleasant day!