Add conditions to interactions
Last updated
Last updated
Conditions are used to control the action flow by determining whether certain action should be executed. The action won't be invoked if the condition returns false.
You can find action condition at the top right corner of the action panel.
Assume we have an action Set text after Press Enter for Input. For example, in the preview, we input a '2' in the box and press enter, then the text element is set to '4'.
Now, we add a condition event.value <=10
to the action. By doing this the action will only be executed when the input value is no more than 10. Then we Click Update and Preview to test. In preview, when a number equal or less than 10 entered, the number will double and set in the text element. On the other hand, if a number larger than 10 is entered, no changes will occur.