Enable/disable a button in a step

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2009 03:06 AM
Hello,
I have bulit a workflow and in one of the step the user
can choose Approve or Reject. There is also a text area field where a user can
fill in a comment. I only want the 'reject'-button to be enabled if the user has written something in the comment field. How can I do that?
I have bulit a workflow and in one of the step the user
can choose Approve or Reject. There is also a text area field where a user can
fill in a comment. I only want the 'reject'-button to be enabled if the user has written something in the comment field. How can I do that?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2009 01:53 PM
If the comment field and the choice is in the same step, there is no way of solving this. There is no interactive connection between the (text) fields and the choices of the user, like in some web forms.
If they are in different steps, you could use a condition statement in your workflow, evaluating the text field's content, or its lack thereof.
<decision name="Evaluation">
<transition name="evaluation_reject" to="reject">
</transition>
<transition name="evaluation_okay" to="okay"> <!– if condition is not fulfilled, the path of above's transition is being taken –>
<condition>#{field == null}</condition>
</transition>
</decision>
If they are in different steps, you could use a condition statement in your workflow, evaluating the text field's content, or its lack thereof.
<decision name="Evaluation">
<transition name="evaluation_reject" to="reject">
</transition>
<transition name="evaluation_okay" to="okay"> <!– if condition is not fulfilled, the path of above's transition is being taken –>
<condition>#{field == null}</condition>
</transition>
</decision>
