Using conditional formatting to disable submit button with repeating section - InfoPath Dev
in

InfoPath Dev

Using conditional formatting to disable submit button with repeating section

Last post 11-15-2011 02:59 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-14-2011 03:24 PM

    Using conditional formatting to disable submit button with repeating section

    I have created an InfoPath 2007 browser-enabled form.  I have the customary submit button at the bottom of the form.  I have a repeating section on this form with a few different fields.  Of note, the repeating section has a checkbox called 'Approved', a checkbox called 'Disapproved', and a text box called 'Reason for Disapproval'.

    If 'Disapproved' is checked, then the 'Reason for Disapproval' text box appears; otherwise, it is hidden.  I want to have conditional formatting on the submit button for the form so that if the 'Disapproved' checkbox is checked, but there is nothing in 'Reason for Disapproval', then the submit button is disabled (so, if 'Disapproved' is equal to 'Disapproved' AND 'Reason for Disapproval' is blank, then disable the submit button control).

    This works fine until the user has multiple instances of the repeating section, and at least one of them has 'Disapproved' checked.  Even if they enter something in the 'Reason for Disapproval' textbox, the submit button will still not enable.  I suspect that submit button cannot tell the difference between the multiple instances of the repeating section, and is waiting for EACH of the text boxes to be filled in.

    Would someone be able to verify this for me, or please let me know how I can modify so that not all of the text boxes need to have a value in them if only one repeating section is disapproved.

     

    Thanks!

    Kelly Hamilton
    Records Analyst
  • 11-15-2011 02:59 AM In reply to

    Re: Using conditional formatting to disable submit button with repeating section

    You should be able to accomplish this with an expression like this:

    Condition:

    Expression: /path/to/repeating/group[Disapproved = 'true' and ReasonForDisapproval = '']

    Disable the control

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.