Text Entry Box Behavior

This topic explains how to use CpExtra preference variables to change the behavior of Captivate's text entry box object.

For the sake of brevity, this article will refer to Text Entry Boxes by their acronym TEB.

xprefPreventTEBOverwrite

Expected value: Boolean (yes/no, true/false, 1/0)
Default value: False

All TEBs have a linked variable, which can be found here.

This means that whenever the user types into the TEB, that text is saved into that user variable.

However, TEBs also have another thing called default text.

TEBs tend to give their default text priority. For example, you type something into a TEB on Slide 1, then you move to Slide 2, later you come back to Slide 1. What value do you see written in the TEB, the variable value, or the default text?

The answer is the default text, which is annoying because that's not always how you want it to work. If you had a slide mimicking the behavior of a form, the user filled it in, then later decided they wanted to come back and change what they wrote, then they would be very frustrated to find all those details they painstakingly wrote down flat out gone.

Fortunately, CpExtra is here to help. By setting the xprefPreventTEBOverwrite variable to true, the TEB will never allow the default text to overwrite the variable value.

xprefTEBUpdateFromVariable

Expected value: Boolean (yes/no, true/false, 1/0)
Default value: False

As noted above, TEBs are all linked to a certain variable. When you write into the TEB, it will update the linked variable with what you've written.

Thank link only goes one way however. If through an Advanced Action you change the TEB's linked variable, the TEB will not visibly update to display the variable's latest value.

However, if you set xprefTEBUpdateFromVariable to true, then TEBs will always display the current value of their linked variable.

IF YOU LIKE WHAT YOU'VE READ ABOVE, THERE'S PLENTY MORE!

Join more than 2500 other Adobe Captivate users just like yourself and receive regular troubleshooting tips, illustrated tutorials, technical information, and creative solutions to real-world e-learning development issues. (See an example here.) Click the button below to join our community.  It's completely FREE!