trigger to make button active when three variables are not empty



I want to set a Submit button to the Normal state from Disabled when three text entry fields have been completed.

I can make it so that the button won't do anything by using the conditions below, but I can't figure out how to set a trigger to change the button state to Normal under the same conditions.  Any hints?

This works:

Trigger that works

This doesn't work



6 Replies
Wendy Farmer

Hi Jen

With trigger 2 - because the last condition doesn't happen until control loses focus by clicking outside of C3  where is the user clicking to make that happen?

The first trigger works because they are clicking a button.

You could try having 3 objects offstage that change state when the user clicks into each of the text boxes. Then the trigger would be

change state of submit to normal when state of all three offstage objects are visited. 

I didn't know if you were using the default Submit button or a custom one - here is a sample with a custom button.

Jen Zapp

Thanks Wendy. I'm teaching myself Storyline by replicating something I did previously in Captivate.  It appears that this off-screen workaround is used for several examples of adding advanced logics, so it was helpful to understand the thought process for using it.

I was hoping that there was some type of If function in Storyline.  A trigger that went something like:

If variable c1<>”” and variable c2<>”” and variable c3<>”” then set State of Submit button to Normal.



Wendy Farmer

Hi Jen

I don't know another way of making this work - maybe JS would be an option but someone would need to chime in here to help you.

As it stands the only way the text entry trigger works is when the users clicks outside of the text entry box or tabs to another field /object on screen that then tells SL that what the contents  of that text entry box are - this is the 'control loses focus' trigger.

Sorry I couldn't be more help.

Christie Pollick

Hi, Jen -- Thanks for reaching out with your question, and as you mentioned you are teaching yourself Storyline, I wanted to share this great resource for lots of tutorials: Getting Started with Articulate Storyline 2. In addition, as Wendy mentioned potentially using JavaScript, I wanted to share that we are not in a position to offer support for JS coding or modifications, but there are many in the community who are happy to share their expertise. Please also see this article on JS Best Practices. 

And, if you would like to share your file, that would be great so others can take a look and offer some advice or ideas you could use! :)

Walt Hamilton
Jen Zapp

If variable c1<>”” and variable c2<>”” and variable c3<>”” then set State of Submit button to Normal.


The variable you are looking for is set State of Submit button to Normal WHEN USER ACTION ... OCCURS If c1<> (Articulate uses !=) "" and c2 != "" and c3 != ""

The true problem is that of getting the user to take an action to commit their text on the third textbox, because what they enter isn't committed to the variable until the textbox loses focus. Which means they have to press tab, or return, or click on something.

The trigger you desire is straightforward; it can easily be fired by the change of the variable, like the example I'm enclosing.

The challenge is getting the user to take that additional action to commit their third answer.

Walt Hamilton

Here is an alternate approach. I personally favor this because anybody who has filled out a form online is accustomed to this style. Additionally, it allows the user to type in the third box, and click on submit without taking some additional action. The act of clicking on the submit button commits the box value to the third variable, fulfilling the requirements, and the click action can proceed.