Elements and variables

644 0 1
Posted   9 months ago


Is there a way i can make an element show, only once multiple variables have been set to true? 




( 0 )

Answers  ( 1 )

Posted   9 months ago
  ●   Edited   9 months ago

My original suggestion wasn’t accurate so here’s an alternative.

Say you have two buttons on the page and you’ve already set each up to change a Boolean variable to True when the button is clicked. The variables are “button1” and “button2”.

You can now set up a trigger based on when one of those variables changes to true with a condition of checking to see if the other variable is also true.

To do this, on the Interact tab select Triggers then select Variable is Changed.

On the panel that opens, select the “button1” variable and select the option for “True” then select Next.

Select Show then select Next.

On the panel that opens to the right of the Stage select the element you want to show.

Leave the other settings as-is and in the Conditions field add

{{button2}} == true

This means that when button1 is clicked, the extra element will show only if button2 has already been clicked.

You’ll need to repeat this set up for the second button.

Some additional thoughts:

  • The variables are available throughout the course, so you can set this up on the same page where the variables are being set or on any other page. For example, you might want to show an element on a summary screen based on things the learner did on different pages in the rest of the course.
  • We also have a Page is Complete trigger that might simplify what you're looking to do (if this is all contained on a single page). Basically, the page can automatically monitor that learners have completed all of its content (viewed all Tabs in a Tab set, clicked all the buttons on the page, etc.) and once that completion is met then that can fire an Action such as showing an element. Here's a lesson that explains this >> Page Trigger - Is Complete   



( 3 )
9 months ago     stephen     43   |   3  

That's awesome. So I've added a current page is loaded trigger, then selected show then next, then selected the element. What is the trigger that I should use? There is no 'on page load' trigger? Also it says my conditions don't work. is this correct?  {{Concept1comp}} == True && {{Concept2comp}} == True && {{concept3comp}} == True

9 months ago     Chris Van Wingerden     1050   |   7  

the original response has been updated with a new set of steps

9 months ago     stephen     43   |   3  

Awesome! Thanks. This worked :)