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

    Conditions with also a pull down menu?

    Asked by besam on February 04, 2014 at 03:35 AM

    If you have a field (project) with a pulldown menu with some choices:
    choice A
    choice B
    choice C

    Would it be posisble you can make the condition as follow:

    IF field "country" contains 'Germany'
    THEN show field "project" with choice A

    OR 

    IF field "country" contains 'China'
    THEN show field "project" with choice B 

    Of course I can make a standard value in the pull down field 'project' (A or B or C as default value) but I'm not able to put also this choice as a standard value in the condition. Seems you have to add an additional selection field.

    Have a look to the screenshot and you'll see 'my' blue selection box what's "missing" to do the work...  
    Will this also be possible in practice?  

    Screenshot
    Selection China choices then
  • Profile Image
    JotForm Support

    Answered by jonathan on February 04, 2014 at 04:22 AM

    Hi,

    This is possible on the form already. Please refer to this guide

    -How-to-Hide-or-Show-Multiple-Fields-at-Once-Based-On-a-Single-Conditional-Entry

    You can group all the fields like in your example using Collapse field.

    Inform us if you need further assistance.

    Thanks.

  • Profile Image
    JotForm Support

    Answered by abajan on February 04, 2014 at 09:05 AM

    @besam

    Just to clarify, if you want to have the default selected option of the Project menu change according to what is entered in the Country field, it's not currently possible to configure such a condition (or combination of conditions) in the form builder. In other words, you can't setup a condition to have a value in a field equal to something if another field contains (or doesn't contain, or is equal to, or not equal to) something. It's true you can apply Show/Hide conditions on duplicate fields to make it seem like that's happening. That's what I did in this demo. If you were to clone the form you'll see that it has three Project fields but since the Hide Empty Fields on Emails feature is enabled, the autoresponse received by the user shows just one such field (provided "Germany" or "China" was entered as the country). However, the submission records of the form will show a separate column for each Project field:

    To have just one column in the records like below,



    you would need to have just one Project field and use a script to change its selection according to what is entered in the Country field. However, due to security considerations custom scripts can't be used on our system. As such, you would have to embed the form's full source into a web page and include the script there. That's what I did in this demo. If you were to clone the form used for this demo (http://www.jotform.co/form/40342569771863), you would see that it indeed has just one Project field. Moreover, none of its conditions were created in the form builder. All of them are to be found in the script at the bottom of the demo.

    Hope this helps.