Forum Discussion
Trigger to unhide continue button before exit course not working.
I can see a simple, easy (but not foolproof) way and a more complicated, more secure way.
The easy way is to alter your triggers a bit. You don't need to unhide the Continue button before they exit in order for it to show when they return. Before closing the content, the Exit Course button c"an run a trigger that flips a variable called unhideContinue to true. Then the course is closed.
If the course is saved in an LMS, the value of that variable will be included in the "suspend" data that's reloaded when the course is reopened, which means when the learner reopens the course, you can have a trigger that checks that variable when the slide with the continue button starts, and if the value is (now) true, the trigger can unhide the button. As long as the trigger runs when the slide starts, it will still rerun every time.
The more complicated method is to script in an actual time lock. If you again make a variable called unhideContinue, we can change its value in a trigger that Executes JavaScript.
The script can set the variable to true when the today's date is numerically greater than or equal to the date you want the assessment to unlock.
let targetDate = new Date(2026, 10, 4); // Nov 4, 2026
let today = new Date();
today.setHours(0, 0, 0, 0);
setVar("unhideContinue", today >= targetDate);
If you're new to JavaScript, it might look a bit weird, but the gist is the last line compares today's date to whichever targetDate you want, and then resolves the comparison into a true or false that it sends to Storyline, triggering your Continue button to show.
Just change the numbers in the "new Date(2026, 10, 4)" parentheses to whatever works best. I think you can test/circumvent it by changing your computer's clock, if able.
Related Content
- 1 year ago
- 10 years ago