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
You would set a condition on your button so that each Text Entry fields is not equal to, ignore case blank.
I've attached a rough example for you.
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.
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.
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.
Thanks - this is what I was looking for - I will add a Next button and then
START. This should ensure the lost focus isn't a problem.
Again, thanks.
Judy B. Cornelius, M.Ed.
Learning & Development Specialist
"Do the right thing, even when it isn't popular."
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."
Hi Judy,
When you create the text entry boxes their variable value should default to blank - so this shouldn't be an issue.
Without seeing your file it's hard to say what the issue is. Are you able to upload the .story (even just for this one slide) here and I can look at it?
Sure.
Sent from Mail for Windows 10
Cool - not sure if it was meant to be attached to your last comment (it's not). But once you upload it I'll see what I can do.
This discussion is closed. You can start a new discussion or contact Articulate Support.