Unrequire a field if another field is filled

  • Nana_Kwabena
    Asked on April 10, 2024 at 10:40 AM

    A portion of my form requests the user to either

    - share the link to a policy (using a textbox) or

    - Upload a document for the policy


    Now I need them to provide at least one of these options, so both are set to required by me.


    How do I use conditionals, so that whichever one of them is filled first, the other one becomes unrequired

    I attached a screenshot of what I did that fails

    Jotform Thread 13758121 Screenshot
  • Jefferson JotForm Support
    Replied on April 10, 2024 at 11:06 AM

    Hi Nana_Kwabena,

    Thanks for reaching out to Jotform Support. I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

  • Jefferson JotForm Support
    Replied on April 10, 2024 at 11:33 AM

    Hi Nana_Kwabena,

    Thanks for patiently waiting. I have provided an easy workaround that you can follow. Let me show you how:

    1. In your Form Builder, select your single-choice element (Policy) and click the Condition icon.
    2. Next, hover on the condition that Requires Multiple fields, click on the Gear Icon, and then click on Disable. Unrequire a field if another field is filled Image 1 Screenshot 40

    Now, we need to add a condition to require only the field that was first filled in:

    1. In your Form Builder, select again your single-choice element and click on the Condition icon.
    2. Next, click the Add Condition button, and select the Enable/Require/Mask Field.
    3. Enter the following details:
    4. IF: Credits and Return Policy (Online)
    5. STATE: Is Filled
    6. DO: Don't Require
    7. FIELD: Credits and return policy (Document)
    8. Hit on Save to update changes in the condition. Unrequire a field if another field is filled Image 2 Screenshot 51

    That's it! Test your form, and you will see that the other field will not be required if any of the fields were filled in first. Check out my screencast below:

    Unrequire a field if another field is filled Image 3 Screenshot 62

    You can also check out this guide on How to Conditionally Change a Field to Required.

    Give it a try and let us know how it goes.

  • Nana_Kwabena
    Replied on April 12, 2024 at 11:46 AM

    The suggestion works!
    Thank you so much.

 
Your Answer