Passing dynamic checklist values as URL parameters

  • psb123
    Asked on March 22, 2014 at 11:55 PM

    I'm trying to pass checklist values selected in Form 1, into Form 2 using URL parameters in a link in the auto-notification email.

    I created a simple test case to work out the technique but I have had no success.

    Can someone take a look (http://form.jotformpro.com/form/40808070054952) and point me in the right direction as to the proper array syntax in the URL query string?

    Thanks

    Scott

  • Elton Support Team Lead
    Replied on March 23, 2014 at 2:44 AM

    Hi Scott,

    Here's an example with URL parameters.

    http://form.jotformpro.com/form/40808070054952?parentcheckbox86[]=Option A,Option B

    parentcheckbox86[] --> Name of the checkbox field after the underscore (check this screenshot). Use browser inspect element to find out.

    Option A,Option B --> Checkbox values separated by comma.

    You can also use this app so you can conveniently generate a prepopulated URL. http://prepopulate.jotform.io/

    Hope this helps!

  • psb123
    Replied on March 23, 2014 at 12:04 PM

    Thanks for the response.  The issue I'm having is in constructing the data that will be passed. I know I need the URL string to end up containing a comma seperated list (as you've shown).

    But my question is what is the syntax to extract those individual checkbox values from the parent form field? (how do I extract individual elements?)

  • NeilVicente
    Replied on March 23, 2014 at 1:02 PM

    @psb123

    The app suggested by our colleague (http://prepopulate.jotform.io/) should take care of this for you.

    However, if you feel the need to be in the know, the values can be found if you look at the source code.

    Passing dynamic checklist values as URL parameters  Image 1 Screenshot 30

    If you noticed, the value is exactly the same as the label, so if you are overwhelmed by codes, just copy the text beside the checkbox on the actual form.

    Passing dynamic checklist values as URL parameters  Image 2 Screenshot 41

  • psb123
    Replied on March 23, 2014 at 1:56 PM

    Thanks but the URL needs to be created dynamically as part of the notification email. The URL arguments need to be generated from the users just completed form entries.

  • NeilVicente
    Replied on March 23, 2014 at 3:29 PM

    In that case, extracting the options selected individually will not be possible without using an intermediary page with a custom script to parse the selected options.

    This is due to the fact that the checkbox value generated by the email template are separated by line breaks or br html tags.

    I'll try to come up with an example. I'll get back to you soon with my results.