Forum Discussion
Disable next button until user enters text into all text entry fields on slide
My inclination would be not to disable the "Next" button, but rather to attach a conditions. If you select your text entry box in the editor, you'll see (in the triggers list) that by default it dumps the student's entry into a text variable. So one trigger would be:
Jump to slide
next slide
when User clicks
Next button
[show conditions]
TextEntry1 Not equal to [default]
AND TextEntry2 Not equal to [default]
AND TextEntry3 Not equal to [default]
This gets at the heart of what you REALLY want: The text entry variables must be populated with something other than their default values. If the user has not typed something into each box, the Next button won't take them to the next page.
Then you'll want a trigger to display an error message if the user HASN'T filled in all the boxes. Make a new layer and call it "Error Message". Put a big friendly text box into it that says, "You must enter all the text fields to continue". Also add a button that says "Okay!" and has a "Hide this layer when user clicks this button" trigger.
Now you need this error layer to come up at the appropriate time. Copy that first trigger on the "Next" button, and in the conditions, change the "ANDs" to "ORs" and the "Not equal tos" to "Equal tos". Also change the trigger so it shows the message:
Show Layer
Error Message
when User clicks
Next button
[show conditions]
TextEntry1 Equal to [default]
OR TextEntry2 Equal to [default]
OR TextEntry3 Equal to [default]
I don't know for sure whether Storyline can handle empty space for the [default] variable value, so you'll have to play around a little.
Greg -
Not sure if you are still around, as this post is 3 years old. However, this helped tremendously! I'm new to variables and am really starting to love their power! Thank you for sharing, my friend.