Variables and Text boxes

Dec 20, 2018

In the post about free-form questions, I have not found the answer to creating prerequisite questions. I need my learner to complete three text fields before beginning a quiz. How do I set variables for text field (name, email, date) before allowing the learner to click a start button for the quiz? 

I have set the button variable to change states when true but don't know how to set the variables for the test entry fields. 

Thanks,

Judy

8 Replies
Shaun Martin

Hi Judy,

If I understand what you're after then if oyu set the intial state of the Begin button to disabled. And then set triggers up to change it to normal once any of the text entry fields is completed, on the condition that the other text entry fields are not empty:

One thing to note with this is that the variables behind a text entry field doesn't update until the 'control loses focus' meaning that the user clicks somewhere else on the screen... This means that if I enter all three text fields the button will still be disabled until i click somewhere else. I guess you just need to decide if that's an issue.

Hope this helps. Someone else might be able to chime in with a better solution.

EDIT - W Gill's a faster typer than me :) I can see they've already provided a solution.

Ian Monk

Hi Judy,

There are a number of ways you could achieve this. 

Creating a text box automatically creates a variable (TextEntry1, TextEntry2, etc.). You could add a trigger to the Begin button that require certain conditions of those variable to be met in order to proceed. 

  1. Give each variable a default value.
    • TextEntry1 = Name
    • TextEntry2 = Email
    • TextEntry3 = Date
  2. Add a trigger/condition to the Begin button that looks something like this:
    • Jump to next slide when user clicks Begin on the condition that TextEntry1 does not equal Name AND TextEntry2 does not equal Email AND TextEntry3 does not equal Date.

This would require users to change the default value of each text box/variable in order to advance. 

Does that make sense? Again, there are a number of ways to set this up.

Judy Cornelius

Hi,

I plugged in the variables and assigned the text entry boxes to their
respective names but the trigger is engaging after the first box contains
text. Do I need to set the default value of the textbox content?

Judy B. Cornelius, M.Ed.
Learning & Development Specialist

"Do the right thing, even when it isn't popular."

This discussion is closed. You can start a new discussion or contact Articulate Support.