locked
How to make field not required when disabled? RRS feed

  • Question

  • Hi,

    I have one drop down which cannot be blank and it has blank as default value. I have also one checkbox with value True and if this one is ticked, then the dropdown should be disabled and allow blank. If the checkbox is not ticked then blank value in the dropdown should not be allowed.

    I have my rule to disable the dropdown which works fine:

    But when I add a validation rule to set it to be required only if it is blank and the checkbox is not equal to True (not checked) then it is always required regardless of whether the checkbox is ticked or not. Rule:

    What am  I missing here?

    Thanks in advance.

    Wednesday, May 30, 2012 6:50 AM

Answers

  • Hi Triple9

    On you dropdown field you should have following rules:

    1st Condition: checkboxField = TRUE and dropdownField is blank  -> ScreenTip Value   //validation rule

    2nd Condition: checkboxField = FALSE  -> Disable Control                                            //disable control rule

    In your case on select field: Disable if nothing to report - should be change to False

                                             Required - Value = True and Subject is blank

    Hope this will help

     


    Regards, Marcin (Please mark as helpful or answered if it helps)

    • Proposed as answer by Marcin C Wednesday, May 30, 2012 7:24 AM
    • Marked as answer by triple9 Wednesday, May 30, 2012 11:22 AM
    Wednesday, May 30, 2012 7:24 AM

All replies

  • Hi Triple9

    On you dropdown field you should have following rules:

    1st Condition: checkboxField = TRUE and dropdownField is blank  -> ScreenTip Value   //validation rule

    2nd Condition: checkboxField = FALSE  -> Disable Control                                            //disable control rule

    In your case on select field: Disable if nothing to report - should be change to False

                                             Required - Value = True and Subject is blank

    Hope this will help

     


    Regards, Marcin (Please mark as helpful or answered if it helps)

    • Proposed as answer by Marcin C Wednesday, May 30, 2012 7:24 AM
    • Marked as answer by triple9 Wednesday, May 30, 2012 11:22 AM
    Wednesday, May 30, 2012 7:24 AM
  • Thanks, the rules I had was correct it's just that I added a checkbox choice to the list and not the checkbox control in InfoPath.

    Edit: I added checkbox and True as on option, not the Yes/No choice, sigh.

    • Edited by triple9 Wednesday, May 30, 2012 11:29 AM
    Wednesday, May 30, 2012 11:23 AM