cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/disable a button in a step

ricny046
Champ in-the-making
Champ in-the-making
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?
1 REPLY 1

_sax
Champ in-the-making
Champ in-the-making
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>