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

  • Profile Image
    webmaster_kingswood
    Asked 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.

  • Profile Image
    sidharth_kch
    Answered 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
    webmaster_kingswood
    Answered 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
    sidharth_kch
    Answered 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