by Lori Smith
During my beginner Adobe Captivate class, I am often asked if it's possible to ensure that learners do not leave a Text Entry Box (TEB) blank. When working with a TEB, you can set specific correct values using the Validate Entry option in the General group on the properties panel.
But what if you want to ensure that learners put something in the box, not a specific value? While there is no setting in Captivate to ensure that a TEB isn't left blank, using a little variable and some advanced action magic can make it happen.
Create User Variables
- Choose Project > Variables and create a new variable. Do not fill in the default value. (I named my variable empty.
Note: This would be a great variable to put in all your templates! - Create another variable to store the TEB data. (I named mine UserData.)
- Attach the UserData variable to the TEB (using the General group on the TEB's Properties panel).
- Create a Text Caption on your slide that tells the user they need to fill in the data. Name the caption error and deselect the Visible in output option.
Create a Conditional Advanced Action
This advanced action will compare the UserData to the empty variable. If the UserData is empty, show the error message and jump back to the beginning of the slide to allow for another try. If the UserData is not empty, Go to Next Slide.
(Note: To make this action generic so it will work with any slide, do not hard code the slide it needs to jump to. Instead, determine which slide you are on and jump to it as needed. You will do this using an additional user variable named thisSlide, and two system variables, cpInfoCurrentSlide and cpCmndGotoSlide.)
The last step is to assign the advanced action to Execute when the learner clicks the Submit button. You can do this via the Properties of the selected TEB (on the Action group).
And there you have it. No more tearing your hair out trying to force a learner to enter information into a TEB instead of just skipping over it.
Got other Captivate challenges? Send them to me and maybe you'll see your problem solved in a future article.
***
Recent Comments