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

    How to change whether a field is required based on other answers.

    Asked by webmaster_kingswood on May 12, 2013 at 12:54 AM

    I have a form with an email and phone fields.  I would like to make the form so only one of the two is required.  I know you can hide fields but I want the field to always be there but it justs changes from required to optional.

    email hide fields
  • Profile Image

    Answered by sidharth_kch on May 12, 2013 at 05:03 AM

    @webmaster_kingswood

    I cloned your form and added some condition to achieve your requirement. I have added the condition to your question "How would you like to be contacted?". If you select "Email" the only email field will be mandatory and if you select "Phone Call" then only Phone Number field will be mandatory.

    Please have a look and let us now if this is what you want: http://form.jotformpro.com/form/31311935345954

    Thanks,

    Sidharth

  • Profile Image

    Answered by webmaster_kingswood on May 12, 2013 at 11:50 AM

    Thanks for answering.  I got that working but I was just wondering if there was a different way.  If you auto fill the form and then choose email or phone the feild switches and gets cleared.  This is not a big deal but I was just wondering if there was a different way.

  • Profile Image

    Answered by sidharth_kch on May 12, 2013 at 12:33 PM

    @webmaster_kingswood

    Unfortunately, I don't see any other option to do this. May be you can download your form's source code and write custom javascript to achieve your requirement.

    Thanks,

    Sidharth