How to display a field based on the State in the address field?

  • JRsPups_Admin
    Asked on May 29, 2020 at 3:49 PM

    I see that this was raised about 5 years ago, wondering if there's been a change or enhancement for this?


    I'd like to display a field when out of state applicants are completing the form.

  • Kenneth JotForm Support
    Replied on May 29, 2020 at 6:33 PM

    Thank you for reaching support,

    Yes, it is possible, by using conditional logic, you can set specific rules to show/hides fields.

    First, I created a drop with two options: 

    1590791125y1 Screenshot 10

    Then I added another field(Paragraph) as a test field and had set it hidden by default:

    1590791207y2 Screenshot 21

    Then go to the Form SETTINGS > CONDITIONS > SHOW/HIDE FIELDS:

    1590791323y3 Screenshot 32

    Then set the following rules:

    1590791380y4 Screenshot 43

    You may add additional rules by clicking the "+" button if you have multiple addresses.

    Here is a Related Guide on Conditional Logic: https://www.jotform.com/help/57-Smart-Forms-Conditional-Logic-for-Online-Forms

    Feel free to CLONE my DEMO form: https://form.jotform.com/201497081603048

    Let us know if you need further assistance.

    Best.

  • JRsPups_Admin
    Replied on May 29, 2020 at 7:28 PM
    The STATE field WITHIN the address block……….


    ...
  • Elton Support Team Lead
    Replied on May 29, 2020 at 10:00 PM

    There's a workaround by passing the Address field value into the Form Calculation Widget then use the form calculation widget in your condition.

    Here's how:

    1. Add Form Calculation Widget to your form and add the Address field in the formula as a string format (A-Z).

    How to display a field based on the State in the address field? Image 1 Screenshot 30

    2. In your condition, use Form Calculation Widget (in my example I labeled it State) in the IF rule and then select Contains and enter the state value. You can also add multiple states separated by a comma. Example:

    How to display a field based on the State in the address field? Image 2 Screenshot 41

    Demo: https://form.jotform.com/201498379901060 (select either Alaska, California, or Hawaii to reveal the Full Name field).

    If you need further assistance, let us know.