Forum Discussion
Text Entry Fields Lose Focus Immediately
Hi Mary and Steven,
As it turns out, I did get an email notification so I guess I am still subscribed to this thread.
Mary, if you download the Storyline file I attached to my original post, you can see how I implemented the field validation for the form. For example, click into the text field to the right of the Building label on the waste form:
In the Storyline timeline, that text entry box is called Building. Right below it on the timeline stack is a rectangle object called Building Outline.
The Building Outline rectangle has a Correct and an Incorrect state:
The Correct state has no fill and a green line (outline) around it. The Incorrect state has no fill and a red line (outline) around it.
Here are the triggers attached to the Building text entry field:
The first trigger sets the variable A1_Building to whatever value the learner types into this text entry field.
The second trigger sets the state of the Building Outline rectangle shape to Correct (green outline around the field) if the A1_Building variable equals the correct value of 62.
The third trigger sets the state of the Building Outline rectangle shape to Incorrect (red outline around the field) if the A1_Building variable is not equal to 62 and it's also not equal to (blank). That check for (blank) is to prevent the outline from turning red if someone clicks into the field accidentally and then clicks out of it without typing anything--we don't want to mark that as wrong until they've actually entered some actual value into the field.
The fourth trigger shows a layer that gives some hints about what might be wrong if the A1_Building variable is not equal to 62 as it should be.
And finally, the last trigger hides that feedback layer when the learner enters the correct value (62) into the field (so that A1_Building equals 62).
That's it. These days, to help people whose color-blindness makes it hard for them to distinguish between green and red, I'd probably add a red "x" to the Building Outline's Incorrect state, and a green checkmark to its Correct state. But the basic setup and set of triggers would be the same.
Related Content
- 2 years ago