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

    Fields become required based on a condition

    Asked by dkcfm2@gmail.com on February 23, 2015 at 02:53 PM

    Hello,

    I was wondering if there was a way that certain fields can become a required field automatically based on answers given in another field or fields.

    For my particular case I have a field that asks what type of payment cycle the customer is on and the answers in the drop down box for that statment are...Monthly, yearly, promo.

    If the option selected is promo, then the next field encompasses a question that needs to be required. But if one of the other 2 are selected then the next field doesnt need to be required.

    Is there a condition offered in the calculation widget that allows me to do this?

    required field yearly next selected
  • Profile Image
    JotForm Support

    Answered by david on February 23, 2015 at 03:53 PM

    Hi,

    There is unfortunately not currently a conditional statement that allows for something to be flagged as required or not.  This could be done by setting the field to required and then only showing it if the conditions are met.  This would allow you to have the field only required if certain selections are made.  However, the user would not be able to see the option unless the conditions are met.  If a required field is not shown in the form, it will not be required.

    You could then have another identical field that is shown if two options are selected, this one is not set to required.

    Here is my test form to show you how it works:

    http://form.jotformpro.com/form/50535707078963

    It is a bit of a workaround but it should allow for what you are looking for.

    Let us know if you have any further questions and we will be happy to help.

  • Profile Image
    JotForm Support

    Answered by david on February 23, 2015 at 03:55 PM

    I actually just remember there is an option to require form fields similar to showing and hiding them.  You would need only set the condition to require another field if a certain selection is made:

    My apologies for the confusion, I had forgot about the require/unrequre condition.

  • Profile Image

    Answered by dkcfm2@gmail.com on February 23, 2015 at 04:24 PM

    That's great! But how do I get to the conditions wizard you showed me above?

     

  • Profile Image
    JotForm Support

    Answered by david on February 23, 2015 at 04:28 PM

    In the toolbar while editing your form, there should be a button for conditions:

    From there, you can add and edit conditions.