Dynamic form completion

  • Paul_Burns
    Asked on April 28, 2022 at 6:31 PM

    I am trying to create a form so that if the user selects an option, then other fields are completed based on the choice.

    eg. if they choose OptionA then Size=1, Colour=2, Style=3; if they choose OptionB then Size=2, Colour=R, and Style=4, etc.


    I looked at the spreadsheet to form but then they have to enter the exact code/option for look up, so that does not work.

    I looked at the Dynamic Dropdown, but that puts the Size, Colour and Style all one column on the submission table, and I need them separate for processing.

    The only other option that I can see is a 100 conditions.. if Options=A then Size=1; if Option=A then Colour=2, if Option=A then Style=3, etc etc. (This wouldn't be a bad option if we could update multiple fields all at once, but you can only update field for each 'test' )

    Are there any other choices/widgets/suggestions?



  • Durand_C
    Replied on April 28, 2022 at 10:09 PM

    Hello Paul

    Thanks for reaching out to Jotform Support. Allow us more time to look into your query. We appreciate your patience and understanding while we investigate this further.

  • Durand_C
    Replied on April 28, 2022 at 11:22 PM

    Hello Paul,

    Thanks for your patience and understanding, we appreciate it. We were able to find a workaround to achieve your request by using the Spreadsheet widget and the Show/hide condition base on user’s answer. Let me show you how:

    1. In your Form Builder, click on the Add Form Element1651201251 626b54e37e9cb add form elemen Screenshot 10
    2. Under the Widget tab, search for Spreadsheet
    3. Drag and Drop it on your form1651201463 626b55b7c2131 spreadsheet Screenshot 21

    In our example, if you select A, color=Red, size=6 inch and style=Classic. If you select B, color=Blue, size=10 inch and style=Casual

    1. We click on the Wand icon of your widget and we set it as the screenshot below for Option A1651201821 626b571d566af widget configur Screenshot 32
    2. We insert another Spreadsheet widget, and we set it as the screenshot below for option B1651201948 626b579c1f052 option B Screenshot 43
    3. In a Dropdown field, we set option A and B1651202072 626b5818b92ab dropdown field Screenshot 54
    • Once done, we click on Settings
    • Select Conditions
    • And select Hide/show conditions1651202271 626b58df14afb conditions Screenshot 65
    • And we set it as the screenshot below.1651202405 626b596559720 condition A Screenshot 761651202416 626b59703edba condirion B Screenshot 87

    Additionally, please take a look at this guide. Here is our Test Form. You can take a look at it and clone it.

    Let us know if you have any other questions

  • Paul_Burns
    Replied on May 14, 2022 at 1:29 PM

    So this sort-of works but you need a spreadsheet for each option, plus you need to a condition for each option. Great if you have a dozen or so static options.

    But I have 200+ options that change yearly.

    Ideally I would like to select eg. a NAME from a dropdown list, and then have the EMAIL address field populate from the database (spreadsheet).

    Yes, I can do this with the spreadsheet to form widget, however, when you are looking up a name it is difficult to use: is the name Smith, Bob; or Smith, Bobby, or Smith, Bob/Jane, etc. Way too many variations and the spreadsheet to form doesn't give you a dropdown... only data input that has to be exact.

    So to recap: I have a spreadsheet of 200 rows with Name in column A, Email in Column B, and Phone in Column C. I would like to use a dropdown and select a name. When I select this name, the Jotform fields of Email and Phone automatically populate from my database/spreadsheet data so that the user does not need to key them in.


  • Raymond JotForm Support
    Replied on May 14, 2022 at 1:44 PM

    Hello Paul,

    Thanks for getting back to us. The best way to achieve your requirement is through the spreadsheet to form widget. You may also consider using some kind of "access ID" and provide these to your responders so they can exactly find their information.

    Alternatively, you may also import your excel into your table, and then use the Prefill form from tables option to automatically prefill your form with data, and send them to their respective responder. I can show you how below:

    • In your form's table, click on Add tab, and select table.
    • Select import file and upload your existing excel file.
    • Once done, the data should then be imported to your tables.

    1652549983 627fe95f3cda3  Screenshot 10

    • Then in Form Builder, click on Publish tab, select prefill on the left menu.
    • Click on Tables prefill, and match fields accordingly.
    • Once done, click on the add new prefill and select the data you'd like to make a prefilled link for.
    • Then you can send the prefilled link to the responders' email address by ticking the checkbox and selecting the send invitation option.1652550199 627fea3716916  Screenshot 21

    1652550212 627fea44dfabf  Screenshot 32

    You can also visit our user guide about How to Prepopulate Form Fields With Data From Other Tables with Table Prefill. Please let us know if there’s anything else we can help you with. 



  • Paul_Burns
    Replied on May 14, 2022 at 1:54 PM

    Question: I see here that I am mistaken... the spreadsheet to form can be used with a dropdown. This demo demonstrates what I am looking for: https://www.jotform.com/213276044805958

    The support page here mentions we can fill the unique code by dropdown box, but it doesn't say how... I am going through the widget setting and don't see how I can achieve this: https://www.jotform.com/help/442-how-to-use-the-spreadsheet-to-form-widget/



  • Rhina JotForm Support
    Replied on May 14, 2022 at 2:32 PM

    Hi Paul_Burns!

    Thanks for reaching out to Jotform Support.

    To start using the Spreadsheet to Form widget follow the steps below:

    First you have to make sure the title/column names on your spreadsheet matches the "Questions" set on your form.

    See below sample spreadsheet:

    (You have to manually type in the Unique Codes. In this case example I will use "unique1" to "unique 3")

    1652552504 627ff338f0da7 Screen Shot 202 Screenshot 10

    In this example, this is how your fields should appear (so it matches the spreadsheet):

    1652552818 627ff4720998b Screen Shot 202 Screenshot 21

    From the "Form Elements" section, click on "Widgets" then click on "Spreadsheet to Form"

    1652552739 627ff423b14f0 Screen Shot 202 Screenshot 32

    Once added, this is where you will be able to upload your spreadsheet:

    1652552895 627ff4bfc77e4 Screen Shot 202 Screenshot 43

    This is how it should work:

    1652553018 627ff53ad7273 Screen Shot 202 Screenshot 54

    See demo form here

    Please try this and let us know if you need further assistance.

    Thanks Paul_Burns!




  • Paul_Burns
    Replied on May 14, 2022 at 2:36 PM

    Rhina, sorry I must not have been clear.

    I know how to use the spreadsheet to form when you enter a unique code.

    What I do not know how to do, and its not referenced in the support page, is how to populate the unique code input field from a dropdown box.

    This demo shows it is possible, but not how to do it.

    https://www.jotform.com/form/213276044805958

  • Rhina JotForm Support
    Replied on May 14, 2022 at 5:26 PM

    Hi Paul_Burns!

    Thanks for getting back to us.

    In this case you can insert text or calculation into a field using conditional logic

    See below steps:

    Add the "Dropdown" Element on the form. In this case the Dropdown element is named "Select a Unique Code"

    1652563408 62801dd052700 Screen Shot 202 Screenshot 10

    Add the following condition to copy the data from the dropdown "Select a Unique Code" to the field "Unique Code"

    1652563552 62801e60c10d1 Screen Shot 202 Screenshot 21

    Please try this and let us know how it goes.

    Thanks Paul_Burns!


  • Paul_Burns
    Replied on May 14, 2022 at 5:33 PM
    Oh my goodness that is so basic I can’t believe I didn’t think about it. My
    bad!
    I was so stuck in looking in the widget settings for the drop-down option
    that I couldn’t see that solution. Thank you so much
    ...