Issue with Show Layer Trigger - maybe

Feb 16, 2022

I've put together a test simulation to see if I can control user input beyond what StoryLine allows by itself. For example, while I can use an input box set for numbers only, I can't stop the user from entering a 100 digit zip code.

So I've put together some javascript code and a simple form that allows me to decide not only length, but what characters are going to be allowed. The form has a layer for each entry desired -  mine has First Name, Last Name, Address, City and Zip. That is so each field can have it's own set of values for things like:

1) What key is recognized as the "go to next field" key (i.e. Tab, Enter, etc.)
2) What characters are allowed for this entry
3) What is the max length allowed
4) What variable will the entry be stored in when finished

All of this allows the creator of the sim to customize the way the javascript will work without having to constantly edit the javascript. It's all handled by triggers that set variables.

Here's my problem that I hope someone can help with:

When I enter the First Name and hit Tab, it goes to the next layer, which is Last Name, based upon a trigger that says to go to that layer when the javascript is done running.

When I enter the Last Name and hit Tab, it goes to the next layer, which is Address, again based upon a trigger that says to go to that layer when the javascript is done running.

When I enter the Address and hit Tab, it is supposed to go to the next layer, which is City, and there is a trigger that says that, but it goes instead to Last Name. Then we're stuck in a loop where you enter the Last Name and it goes to Address, which sends you to Last Name, which sends you to Address, etc.

Each layer is an exact duplicate of the others but with some Triggers/Variables set differently. I can't figure out what is going on.

I'm attaching the test simulation for y'all to look at and see if I've done something silly that is causing this problem.

I appreciate any help you can give.

I'm on Windows 10 running StoryLine 3 (Update: 11: 3.11.23355.0). Note that I cannot update the software as my company has that locked down tightly. :-(

Michael

 

 

Be the first to reply