Next button

mmalhotra-9265
mmalhotra-9265 Community Member Posts: 310 ♪ Opening Act ♪
Hi,

In the attached file,
1. I disabled the NEXT button to ensure that user clicks all tabs.
2. Have added variables to ensure that NEXT is enabled when all tabs are clicked.
3. However, for some reason the NEXT button is still not enabled.
4. Which action needs to be corrected.
5. Kindly suggest.

Comments

  • carlfink
    carlfink Community Member Posts: 943 ♦ Idol ♦
    edited December 2, 2020
    You have all three buttons trying to add letter values to variables. "Add" means "the mathematical operation of summing." Since we are using regular 0-9 numbers, you can't add the letter "B" to anything.

    You need to have three separate variables, and Set them to the value you want, rather than adding. (If you use just one variable, Clue 1 would set it to "A", but then the Clue 2 button would set it to "B" and it would not be "A" any more.)

    Note to ELB: why not have the Publish process report an error when someone tries to add "A" to a variable? Since we aren't using hexadecimal, that's quite meaningless.
  • timk
    timk Community Member Posts: 1,195 ♦ Idol ♦
    But you can of course add "B" to a variable. If the initial value was 0, it would then contain 0B. Later on you need conditions to check "If my_variable Contains B".
  • aoswald4
    aoswald4 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 1 ☆ Roadie ☆
    Assign each clue a variable, modify the variable to 1 when the learner clicks on it, show the next button when all three variables are 1.
  • drago
    drago Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 6 ☆ Roadie ☆
    I have used the same method to add a letter to a variable and it worked 100%. So, if you have 3 buttons, each will add A, B or C respectively to the variable. Set the condition to "if variable so and so contains A", "if variable so and so contains B"...than enable Next. Not sure what will happen if the user clicks multiple times and the variable limit is exceeded.
  • carlfink
    carlfink Community Member Posts: 943 ♦ Idol ♦
    I mentally was working in a language like Python, where once a variable is numeric you can't add a string to it. Obviously, I should have questioned that assumption.
  • aoswald
    aoswald Community Member Posts: 119 ♪ Opening Act ♪
    @drago instead of adding to the variable, set it to A. That way the learner can click on it several times and it will still be A. When all the variables have been set to the prescribed value, your next button will show.
  • mmalhotra-9265
    mmalhotra-9265 Community Member Posts: 310 ♪ Opening Act ♪
    Thank you all..this works for me now.