How to choose an option in radio button from prepopulated value?

  • bdaparking
    Asked on June 16, 2019 at 5:16 PM

    Hello.  I want to setup a form where the user chooses from options that are populated dynamically via the form's URL.  For example, the URL specifies that Option 1 will be "665 Main St" and option 2 will be "663 Main St".  I can get these values to populate in text fields, but I can't think of how to them from there into radio button or dropdown options.  In this application, I can't just come up with all the possible options and then set up a condition to show which will show, as the options will be completely variable. 

    If it is impossible to setup dynamic options, then I could show the options in read-only text fields labeled "option 1" and "option 2" and then have the user choose "option 1" or "option 2", but I'd like to highlight the field that is selected or somehow make it obvious to the user which one they are choosing (to make the form easier to understand and prevent errors); I can't think of how to do that either.

    I actually need to setup a number of these option selections within the same form, all pre-populated dynamically from the URL.  So making it clear and not confusing is important.

    Any suggestions?

  • Jed_C
    Replied on June 17, 2019 at 12:41 AM

    This is possible with pre-population method https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters. You can then create a condition that if hidden input field is filled, select Option 1 or 2.

    I cloned your sample form here https://form.jotform.com/91670584895978?option1=sample and applied the methods I've mentioned above.

    What I did was:

    1). I use the prepopulation method https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters 

    2). I use the update/calculate condition https://www.jotform.com/help/268-How-to-Insert-Text-or-Calculation-into-a-Field-Using-Conditional-Logic

    3). In update/calculate condition, I put the exact option value of the radio buttons.

    ex.

    1560746334The Easiest Online Form Builde Screenshot 10

    The option1=sample in the prepopulate URL is the unique field's name and value which is "sample".

    I hope that helps. Let us know if you have any questions or if you need further assistance. 

  • bdaparking
    Replied on June 17, 2019 at 8:43 AM

    Thanks.  But this is not working.  When I click on the URL, it does not show option 1 as "sample"; it shows it as the original text of the option.

  • Jed_C
    Replied on June 17, 2019 at 12:55 PM

    Please try again, I have set Option 1 and 2 as visible so you should be able to test the URL's below.

    To fill Option 1 — https://form.jotform.com/91670584895978?option1=sample 

    To fill Option 2 — https://form.jotform.com/91670584895978?option2=sample 

    Let us know if you have questions.

  • bdaparking
    Replied on June 17, 2019 at 2:45 PM

    Thanks.  Perhaps you misunderstood what I was wanting to do.  Your example is selecting option 1 or option 2.  However, what I am trying to do is to change the option text to show as the URL parameter.  So, in your example form, I was expecting the option to actually read "sample" (or whatever else we might put after the equal sign).  Your examples do not change the text of the options; they still show as "Value from Option # field here"

  • Elton Support Team Lead
    Replied on June 17, 2019 at 5:59 PM

    Unfortunately, changing the checkbox/radio button text options dynamically through URL parameter or condition isn't possible in the form builder.

    This is however possible when you use your form source code by adding custom scripts in the source. This will help https://stackoverflow.com/questions/52176382/change-radio-button-value-dynamically

    If you need further assistance, let us know.