Test Variable has a value before continuing

Dec 09, 2020

Hi I was wandering if anyone could help.

I would like to check the variable LearnerName has a value, not left blank or filled with whitespace before continuing to the next slide.

I need to prompt the user to enter a value if they just click continue without entering a name and then only allow the continue button to work if there is indeed a value in LearnerName.

Thank you for taking the time to read this, any help would be appreciated.

2 Replies
David Schwartz

Hi Kelvin,

You need a little bit of Javascript to do this, It needs to look at what the user typed, strip any blank spaces from the beginning of what was typed, and then see if the length of what remains is at least 1 character long.

I edited your sample to add this, and a prompt slide. There are a number of ways to do this, but you do need Javascript.