Workflow Soluiton

 View Only
  • 1.  Disable (Grey Out) a control based on another control's value

    Posted Mar 05, 2010 10:50 AM
    Does anyone know a way to disable (grey-out) a control, say a check box, based on another check box being checked? Maybe something with a dynamic update panel?-Thanks!


  • 2.  RE: Disable (Grey Out) a control based on another control's value

    Posted Mar 05, 2010 01:09 PM
    Built-in Workflow components have no greyed-out feature.  They are either visible or not.  You can easily do this with the DynamicUpdatePanel.

    Put both components in the DynamicUpdatePanel.  For the controlling checkbox component, make sure that the box "Post form on value change" is checked.  That is essential for the DynamicUpdatePanel to work.

    For the component that is being controlled by the checkbox, edit the "Visible" property.  Set the visibility based upon a process variable (ThisFormData --> your checkbox variable).

    NOTE: You can achieve the greyed-out effect with a little bit of work.  You can use two components: one form component like a check box, and one image that is the "greyed-out version".  Put them directly over each other.  Set the visibility of each opposite each other: when one is visible the other is not, and vice versa.  Then when the controlling checkbox is checked, the correct component is visible, and when the controlling checkbox is not checked, the greyed-out image is shown.

    If you want the visibility switched (i.e. you want a component to be invisible when the check box is not checked and visible when the check box is checked), you have to use a dynamic model for the visibility.  Use a True-False component, and set the paths to end at True or False outcomes as needed.