Using Variables to Control Button States
Jun 02, 2022
By
Tracy Naso
I want to be able to display a button state as a feedback after "Submit" button is clicked. There are 4 possible button states based on if a.) Choice is Correct or Wrong; and b.) If Learner Clicked Button or Did Not Click. It seems simple enough to accomplish using variables to determine which button state to display, but I am having trouble constructing the statements. I've attached my source file and a diagram of which graphic I want to display based on which combination of variables are true.
2 Replies
Hi, Tracy.
Thank you for reaching out and sharing your .story file!
If I understand correctly, each button will only be one of two states (Yes/NotSelectedButCorrect or No/Distractor). Since when designing, you already know which ones will be correct/incorrect, you can create the conditions based on the states they're in when the user submits:
Here is an example of:
And here's an example of:
Let me know if this works!
YES! That worked. Thanks for the quick response.