Conditional Trigger for Submit button

Feb 04, 2022

Hello,

I have created a storyline file with multiple quizzes branched into multiple sections. I have created a trigger on the Master slide that moves a slider if a user clicks submit (user clicks submit = add 1 to variable; slider moves if variable changes). The variable seems to be working correctly, the only issue is that I want the slider to move if an answer is submitted, as oppose to every time the submit button is clicked. For the latter, the slider will move if a user clicks submit without selecting an answer. So, theoretically, a user can keep clicking submit and not  advance through the course, but the slider would move until it reaches the end.

Is there a condition I can add to make sure the slider doesn't move if an answer is not selected? If not, is there an easier way to create what I am looking for?

10 Replies
Tom Kuhlmann
Since the trigger is to add 1 when clicked, you need a condition to prevent it from allowing the object to be clicked again.

You could add a T/F variable for each slide, something like SlideClicked and set it to False. When the user clicks the submit change the variable to True.

Then you can have a trigger that adds 1 when clicked on the condition SlideClicked = False. Once they click, it changes to True and the next time they click submit it won't add 1.

If you want to keep it simple, assuming they don't revisit the slides after the initial viewing, you could have one slideclicked variable on the master and at the beginning of each slide reset it to False. But that only works if they don't revisit the slides
Kyera Fletcher
Since they may revisit the slides I have added triggers to each individual slide:
  1. Set SlideClicked to value False when the timeline starts on this slide
  2. Set SlideClicked to value True when the user clicks submit
Then on the master slide I have:
  1. Add value 1 to Progress when the user clicks submit if SlideClicked equals False
  2. Move Slider when Progress changes
I might not have set my triggers up correctly. I am assuming I would have to reset the trigger back to False at the beginning of each slide, so I added a trigger for that, but it still isn't working correctly. Does the timeline on a quiz start over if an answer isn't submitted?


Kyera Fletcher
Yes, yours is working correctly. Thank you for taking the time to create and share! I think the issue may have been the placement of my trigger! I had the "Add value 1 to Progress when the user clicks submit" trigger on my Master Slide, when I moved it to an individual slide, the preview of 1 slide worked, but it still isn't working correctly when I preview it completely. I am attaching a portion of my file here!
Maria Costa-Stienstra

Hi, Kyera.

Thank you for sharing your .story file!

The order of triggers is very important in Storyline. Take a look at the screenshot below:

Windows 10 (1) 2022-02-07 at 3.03.35 PM

Once the user clicks submit, the first trigger is executed (Submit Multiple Choice). Since that trigger also jumps to the next question, the second one (add value to Progress) doesn't happen. 

If you change the order of the triggers, your project should work as expected.

I hope this helps!

Tom Kuhlmann

Assuming you are in a published mode and not just previewing a slide. 

When you click submit, it makes sense that the progress bar moves because you have a trigger to add 1 when clicked. If you click and it adds 1 and moves to the next slide, then you shouldn't see the submit button to click again. So that should solve it. 

However, if you do continue to see the next button, then you need a condition such as T/F to determine if the submit button was already clicked.

Two other ideas

One thing you could consider is getting rid of the +1 on submit and just adding +1 when the slide starts. So they submit, jump to next slide and +1. If you do that, then you need a similar condition to determine if the slide was visited.

For example SlideVisited = F. When they click submit on the slide, you can change that variable to True. Then when they come back the SlideVisited is True. The trigger for progress would be Add 1 to Progress when slide starts on condition that SlideVisited = F. 

Another idea is to use the slide progress variable. You can scroll down to see what's available here: https://articulate.com/support/article/Storyline-360-Built-In-Variables