help with checking a variable is not empty
Jan 25, 2018
In the tutorial (I'm using SL 2) for interactivity https://youtu.be/PWAN2zRM2W0?t=392 there is a text variable entry (yourname). You click submit and the trigger sends you to the next slide.
I would like to have a trigger that checks to make sure the user did not click submit without entering a name. I tried Show layer (with a feedback saying "fill in the box") when the user clicks the submit button If yourname is = to blank. That doesn't work.
I tried putting in a hotspot that shows the layer. That works to show the layer and I put a trigger to hide the layer when user clicks on the text entry box. However, then the submit button doesn't work. When I send the hotspot to the back, the button gets the click and it goes to the next slide even if the text box is empty.
What to do? Thanks, Steve
5 Replies
Hi Steven
is this the sort of behaviour you are after?
YES!! Exactly. How did you do it?
I figured it out. I put an if condition on the submit button if YourName (my variable) is not qual to, ignore case blank. Thanks for the push.
Sorry just saw your reply.
Here is the sample file in case anyone else is following along
Thanks for the file. Your solution is much more elegant and does much more. I like the way you change the state of content.
So much to learn. Nice to have heroes like you to step up and help out.
This discussion is closed. You can start a new discussion or contact Articulate Support.