Forum Discussion
Help! I can't get Submit Button Triggers to Work Correctly!
Here's an important fact about triggers: Triggers run in order. Thus, if the user clicks Submit before selecting any response, the program will briefly show the Invalid Answer layer. But it will also immediately run your trigger for jumping to another slide based on what's selected. So those triggers need to be deleted.
And here's an important fact about the Submit button: For survey questions (and for graded questions without immediate feedback), the "Submit [interaction]" trigger includes a command to jump to the next slide.
If the slide is the last one in a scene, it can't do that. And even if there is a "next slide," there's no way to tell it to jump to a different slide based on the response.
Fortunately, there are workarounds to do what you want. The attached file shows how.
- I added two T/F variables: one to track whether the user was an MD or DO (as per response on 1.15) and the other to track whether they granted permission (as per response on 2.1)
- On slide 1.15 (LQ14), I added a trigger to change the branch_MD_DO variable to True when the user clicks Submit, with conditions that MD or DO is selected. Note that this trigger comes before the "Submit [interaction]" trigger.
- Because 1.15 was the end of your scene, the "Submit [interaction]" trigger had no "next slide" to jump to. So I added one.
- On the new slide 1.16, I added a trigger that branches to the appropriate slide in scene 2 based on the value of the branch_MD_DO variable. That runs when the timeline starts on the slide. There is a quick flash before the user lands where you want them to be, but at least they land where you want them to be.
- On slide 2.1, I added a trigger to change the branch_Permission variable to True when the user clicks Submit, based on which button is selected. Again, this trigger comes before the "Submit [interaction]" trigger.
- On slide 2.2, I added a trigger to jump to the results slide in scene 3 if the branch_Permission variable is False. That runs when the timeline starts on the slide, so there is a quick flash for users who branch to 3.2.
Related Content
- 10 months ago
- 1 month ago
- 1 month ago
- 10 months ago