Required Field Cannot Be Bypass Using Show/Hide Condition

  • Profile Image
    Asked on June 14, 2013 at 09:17 AM

    I have a required field that triggers a conditional field - which is required if the condition is met. The problem is when the condition is not met the validation for the hidden conditional field creates an invalid data error.


    Are the shipping and billing the same? Yes/No

    If no show the address field - which is required

    If yes do not show address field


    When yes is selected and the form is submitted the user receives an error stating the shipping address is required.


    My quick work around was to make the shipping address not required - but of course I would prefer the form worked like it once did. This is a new problem that I'm guessing is related to the recent update. As of a few days ago my form was working fine.

  • Profile Image
    T. Gray
    Answered on June 14, 2013 at 02:31 PM

    Same problem with conditional payment choice, both payment options were set as required fields but only one would show per user choice. Now if Pay by Check is selected, error message of Pay by PayPal is required appears. As above, did a quick fix and set both payment fields to not required, but this is not what I prefer. Form seemed to be work OK as of yesterday.

    Page URL:

  • Profile Image
    Answered on June 14, 2013 at 02:41 PM


    I have just released a fix for this bug a few hours ago. Please set your payment field as 'Required' again, and let me know if you still encounter issues.

    Best regards

  • Profile Image
    Answered on June 14, 2013 at 03:25 PM

    Just did as you requested and set payment fields to required. Problem does not appear to be fixed. Received the following error message, so I have reset the fields to not required. This form is in use today so I have to have it working. Thank you for any help you can give and for your prompt response.

    Incomplete Values
    There are incomplete fields in your submission: Pay NOW with Credit Card through PayPal is requiredPlease go back and fix the problem(s)
  • Profile Image
    Answered on June 14, 2013 at 03:44 PM

    Fixed for me!!

    Thank you

  • Profile Image
    Answered on June 14, 2013 at 04:12 PM


    Is there a form that we can check?


    We are happy to hear that. Thank you for update.

  • Profile Image
    Answered on June 14, 2013 at 06:05 PM

    Set the fields back to required and everything seems to be working again. Thank you so much for the support. Looks like the problem is fixed.

  • Profile Image
    Answered on July 03, 2014 at 08:14 PM

    I'm not sure if the problem was re-introduced, or whether the problem is more complex allowing it to work for some and not for others, but for those that are having issues like me, I found a decent work around for forms that are embedded on your own site.  There is a JavaScript function in jotform.js that handles setting or unseeting the required field condition.  The first argument is the field number (the number at the end of the field's id) for the field you want to change the required option on and the second argument is either true to enable the required requirement or false to disable it.  For example:


    would remove the required requirement from the input question number 21.  Then you can just use jQuery or any other library you chose to show or hide the question.  I found the easiest way was to add a div with a related id for example, surrounding the set of elements that needed to be hidden.  Then you just hide the div and call the above function to remove the required requirement and do the opposite to show and enable it.

    An example of a multi field use case is as follows:
            function showHideVP() {
            var numVP = parseInt($j("#input_54 option:selected").prop("value"));
            switch (numVP) {//Hide VP fields cascading to include up to the correct number.
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            switch (numVP) {//Show VP fields cascading to include up to the correct number.
            case 8:
            case 7:
            case 6:
            case 5:
            case 4:
            case 3:
            case 2:
            function showFields(divID, field1, fieldset2, field3) {
            function hideFields(divID, field1, fieldset2, field3) {

    This set of functions uses a drop down element to choose the number of vice presidents to show (1 is required, but the other's are optional. and divs with related ids are set around each group of questions. The functions showFields and hideFields just take in the numbers for the fields in each group.  I had to create duplicate fields for each additional vice president, and then look up the numbers for each field in the group and add them to the cascading switch statements to show and hide them.  A bit of work, but it was actually less than the work when I tried to set this up using the built in conditionals.

    I hope this helps anyone else struggling with this issue.