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

    Conditional Dropdown Fields

    Asked by crsslo on September 27, 2013 at 06:42 PM

    Would like the ability to hide options of one field when another field is filled by a certain option.

    ex:

    I have a form with fields Dropdown A and Dropdown B.

    Each field has has four options, 1-4.

    When option 1 is selected in Dropdown A, I would like to hide options 2 and 3 in Dropdown B.

    Feature Request show/hide options dropdown options toggle select items
  • Profile Image

    Answered by Cesar on September 27, 2013 at 07:33 PM

    Hello, 

    I have have a suggestion on how to go about setting this up through conditional rules. 

    http://form.jotform.co/form/32697818688881

    You can set it up under the Conditional Wizard, by selecting:

    Show/Hide a Form field

    https://cms.jotform.com/uploads/image_upload/image_upload/global/18563_columnconditional2.png

    Then using the following logic to have 3 columns, A B C,. if column A has 4 options and options 2 , 3 and for are selected, you will use column B,. but if option 1 is selected you will have column C for you to use, which would have different options than Column B:

    https://cms.jotform.com/uploads/image_upload/image_upload/global/18564_columnconditional3.png

    Kindly test out my example form: http://form.jotform.co/form/32697818688881

     

    If you need further assistance, do let us know.

  • Profile Image

    Answered by crsslo on September 27, 2013 at 07:48 PM

    We already use conditional logic to hide/show fields.  What we would like to do is consolidate fields that contain the same options but are triggered by different conditions.  It may not be possible, but we dont want to hide a field, we want to hide options within a field.

  • Profile Image

    Answered by Cesar on September 27, 2013 at 08:56 PM

    I see, I'll go ahead and submit the Feature as per your request. Now, I'm unable to provide an ETA for this feature to be implemented. And I'm also unable to promise this feature will be implemented in to JotForm. Nevertheless, the Development Team will be evaluating the request, and the will conclude if it's feasible or not to create such feature.

    Any update from the Development Team will be posted on this thread. Thank you.

  • Profile Image
    JotForm Support

    Answered by abajan on September 29, 2013 at 11:02 PM

    @crsslo

    Until such functionality is implemented by our developers, there's a workaround: Add a second Dropdown B field with options 1 and 4 deleted, as in this demo. If you clone the form, you'll see that it actually contains three dropdowns (one A and two Bs) but the condition toggles the visibility of the "Dropdown B" fields.

    As an added touch, the demo also employs the Hide Empty Fields on Emails feature, so that the autoresponse to the user wouldn't show the unanswered Dropdown B field:

  • Profile Image

    Answered by crsslo on May 01, 2014 at 10:56 AM

    Would like to bump this as we are still interested in this feature.  Our main problem is that while we can hide fields based on selections, those field's values, even though hidden, still act on their conditions.  What may be more useful is the ability to control the hidden fields selection based on a condition of another field, or if the field is hidden.

    ex:

    "If dropdown A is hidden, then make dropdown A not filled"

    "If dropdown A is hidden, then make dropdown A selection = x"

    "If dropdown A selection = x, then make dropdown B selection = y"

    Basically, the ability to make conditionals not react to hidden fields.

    Another option may be to create a "disabled" state for fields.

    ex:

    "If dropdown A is hidden, then make dropdown A disabled"

    "If dropdown A selection = x, then make dropdown B disabled"

    Thanks very much for your time.

  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 01, 2014 at 12:12 PM

    Hello crsslo,

    Unfortunately we do not have such features currently. There is a feature request already created for this requirement but we have not received any update on this yet.

    If your requirement is critical, you can download your form's source code and add custom JavaScript code to add items to your dropdown field. 

    Thank you!

  • Profile Image
    JotForm Support

    Answered by Kiran on March 24, 2016 at 06:36 PM

    Sven, 

    Could you please check if our Dynamic Dropdown widget matches to your requirement? If it doesn't help, please let us know. We will be happy to assist. 

    Thank you! 

  • Profile Image

    Answered by gijs_ros on March 25, 2016 at 08:28 AM

    Hi Kirann,

    thank you for your quick response.

     

    What i am looking for is as follows:

    We are creating a holiday packinglist. Based on the input of our customers we would like to generate a packinglist for them. We work with a lot of conditional logic to show/hide certain fields.

     

    https://form.jotformeu.com/60573168018355

     

     

    We work a lot with Checkbox fields where customers can check stuff they want to bring on their holiday. My problem is that i want to show/hide certain options WITHIN a checkbox field, based on earlier input.

     

    example 1: 

    When in field 'Gender' answer = Male


    > in field 'Bagage' hide the option 'Beauty Case' (female).

    and show the rest of the luggage.

     

    example 2:


    When in field 'Type of Holiday' answer = Beach vacation

     

    > in field 'Clothing' hide the option 'Snow gloves'.

     

    Hope you can help me with this.

    Otherwise i have to duplicate certain checkbox field more then 10 times.

     

    Kind regards,

     

    Sven

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 25, 2016 at 09:59 AM

    Hello Sven,

    Unfortunately it is currently possible to achieve your requirement within the form builder. The only possibility seems to be downloading your forms full source code and adding custom JavaScript  to dynamically add/remove checkbox options.

    The following guide should help you how to download your form's full source code:  https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form 

    You may also like to take a look at the following guide form javascript code as well:  http://www.dyn-web.com/tutorials/forms/select/option/ 

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • Profile Image

    Answered by gijs_ros on March 30, 2016 at 02:19 PM

    Hi Ashwin_d.

    Does Jotform have Javascripters or Javascript knowledge?

    I do not know how much code is neccesary for what i want, but is it possible for you to create an example Javascript code with logic that i can clone and alter for other purposes in my form?

    For example:

    If field Geslacht (gender) = Male > then in field Bagage hide 'Beauty Case'.

    Thanks in advance.

    Sven

  • Profile Image
    JotForm Support

    Answered by Kiran on March 30, 2016 at 03:31 PM

    @Sven,

    Your question is moved to a separate thread and shall be addressed there shortly.

    https://www.jotform.com/answers/806333

    Thank you!