Scrolling Text Interaction to replace Text Entry Box

Intro

Although I have already posted about one Submit button for multiple TEB’s, recently users tried to apply that blog to non-validated TEB’s, which was not the goal of that original post. Moreover giving another attempt to a TEB where the Submit has been done has become less easy with HTML5 output. SWF output had so many advantages (rewinding the playhead a couple of frames was simple), but that is the past.

Instead of writing long answers to the most recent thread, to explain why choosing Scrolling Text Interactions was a better choice for non-validated fields, I created a short example file. The workflow explanation will be in this article..

This example was created with version 11.5.0.476, the most recent version of Captivate. I uses some image and button assets from the new Assets panel. However, nothing has changed for interactions in this major update to version 11. I am confident that the solution will work for every version since 8, meant for HTML output.

Example

File has two slides. Only the first slide is relevant for the workflow, the second is meant to test the Continue button (with action "Go to Next Slide").

The first slide has three fields to fill.  If any field remains empty, a textual warning will appear and you can retry. The Continue button appears when all fields have an entry. Project has no poster image, just the default play button. It is not rescalable. Here is the link


Setup

Variables

For three fields you need 3+1=4 user variables, none of them needs a default value in its definition:
  • v_one, v_two and v_three will be used witl be associated with the Interactions
  • v_null is needed for the advanced conditional action to test if the field is blank; more info in ‘Where is Null’

Scrolling Text Interactions

Next to each Text container (used a shape) an instance of the Scrolling Text interaction. Here is a screenshot of the setup of the first of them. Important is to link one of the variables and to uncheck the option ‘Read only’:

You see in the dialog box that I edited the font (used an Adobe font), the font size and attribute.  Just a reminder: it is not sufficient to type in a variable name to define it, you need to define it in the Variables dialog box. 

Although I resized the interactions to the same height as the Text containers with the questions, the height is decreased in the output file. Be careful with copy/paste to duplicate an interaction, prefer the Duplicate functionality within Captivate (CTRL-D).

Advanced Action

This action is triggered by the Submit button. I used the On Enter event of the slide to hide the warning that will pop up if at least one field is empty. This is the Preview dialog box. The operator 'is equal to' is replaced by the JS equivalent needed '=='. The logical operator OR is replaced also by its JS equivalent |  As you perhaps know, an advanced action will be converted to JavaScript on Runtime.

The replacement of the grayscale image by the color image, disappearing items on the slide: all is achieved using  the timeline. For those interested, here is a screenshot of that timeline, I didn't group any items, but their label clearly shows what they are.

Conclusion

As usual I appreciate any comment, whether to add an alternative or to ask questions. You are welcome on my website as well.

Text Entry Boxes: Back to Basics

Intro

Reasons for this article are multiple. I watched a basic tutorial yesterday that skips a very important step and includes a cumbersome unnecessary workflow. Lot of questions appear on social media including Adobe forums and eLearning community. Lot of my tutorials for Text Entry Boxes include example files published to SWF, and were written for older versions. Time to translate everything to the most recent version (11.0.1.266 today) and for HTML output because there are minor differences. This first article is very basic, meant for newbies or for more advanced developers to refresh their memory.

Validated or Not

Text Entry Boxes are Interactive Objects. It may be a bit confusing since CP8 (change of UI) that you have to find them under the Text Button, not on the Interactions button. There are a couple of ways to recognize interactive objets:

  • Their timeline (when not selected) is green
  • In the Properties panel you have a tab Actions, allowing to trigger one or two actions
  • You can turn on Reporting in the Actions tab. A score attached to the objet (default = 1pt) can be added to the total quiz score.

Text Entry Boxes allow to let the learner enter text, which will be stored in an associated variable. This means that it the value can be used later on. It is one of the two interactive objects that will be automatically inserted when creating a software simultaion in Training or Assessment mode (the other object is the click box), whenever the learner is required to fill in a field. In Captivate tthe only other ways to allow learners to put in text is by using the Notes or the Scrolling Text Interactions.

Text Entry Boxes can be used in two ways:. 

Not Validated

This is the default setup, learner can enter whatever he wants,  any entry is considered to be correct. 

However you can restrain the characters that may be used by clicking the More Options button, and you can set the required number of characters as well. If you activate the option 'Auto Submit' it will be submitted when the lenght of the entry has been reached. You don't need the Submit button in that case, can drag it out to the scratch area. If you don't activate anything in More Options, all characters (numeric as well) will be accepted but that option will (strangely) not be checked.

Let us look at the Actions tab. As with quiz and Knowledge check slides, you have a Success action and - in case of limited attempts - a Last Attempt action. That is a bit confusing, because any answer is considered to be correct for a non-validated Text Entry Box.  and the cause for a question that pops up sometimes in the forums. There is only a Success event, which means the Success action will be done all the time. Look at an example from a recent question:

"I offer 3 attempts to fill in a TEB, but it is only possible to enter once, the playhead moves on after the first submission'. 

Default Success action is set to Continue for a TEB.  This action will be executed after the first attempt, playhead moves on indeed. To avoid that, you could change the Success action to 'No action'. Result: user will have to fill in the field three times, after the third submission the Last Attempt action will be done. Maybe not what you want?  An easy solution is to add a custom button 'Next' to move to the next slide for users who do not want to fill in the field 3 times.

There is no built-in functionality to check if anything has been typed in the field when the Submit button is clicked. You can use the workflow described in this post if you don't want to end up with an empty variable.

Option 'Reporting' will be dimmed for a non-validated TEB, which is logical. 

Sometimes ignored, but worth mentioning: if you expect to have a long text to be entered, please check the option 'Show Scrollbar'. You can see it activated in the most recent screenshot.

The shortcut key is Enter, which is pretty common to confirm an entry in a form field. You can change it to TAB if you have mulltiple TEB's on the slide. 



Validated

A Text Entry Box is validated when you check that option.  WIth the selected TEB a HUD will appear to enter the possible correct answers using the + button.  It is recommended to put the By default the option 'Case sensitive' is not checked, but I did so in this screenshot:

Tip: you can resize the TEB, it is not necessary to put the longest entry on top as is the case for FIB quest

Because you have defined correct answers, the TEB has now two events: the Success event, and the Failure event if you have a limited number of attempts. Success action is only happening if a correct answer is given, the Last Attempt action after the last attempt if that was still a failure. Be sure to turn on the Success and Failure captions. There is no Retry message as you can have for quiz slides, nor multiple Failure messages. I have a workaround for that, but that is outside of the scope of this basic post.

A validated TEB can be scored, the score can be added to the Quiz total (will appear in the Advanced Interaction panel) and be reported. As I mentioned before, when creating a Software Simulation in Training or Assessment mode, you will see that reporting is turned on automatically.

Typical use case for validated TEB's: use multiple TEB's to create a custom Fill-in-the-Blank question, if you want to have each blank field to be scored individually. That is not possible with the default FIB quiz slide.


Associated Variable

A Text Entry Box needs a, associated variable to be functional. That is the reason why a generic variable is created automatically. It has the same name as the Text Entry Box, which is a bit confusing because the general 'law' in Captivate is never to reuse a name for a second item. However there is a very easy workflow to create and associate immediately a user variable with a more significant name. No need at all to open the Variables dialog box and create that user variable (as you can see in other tutorials). Follow these steps, after having inserted the Text Entry Box (validated or not):

  1. Click the X button next to the Variable field which currently contains the generic variable (in the screenshot it is "Text_Entry_Box_3"
  2. Type a name for the user variable. It will be created and associated with the TEB. In the screenshot: "v_name"

You can verify (not necessary) in the Variables dialog box. The original variable with the generic name is still there, but as you can see in the following image, no longer in use. If you are in spring cleaning mode you can safely delete it.

Displaying Variable

This is not specific for a TEB variable, but for all variables. More details in this post.

Do not type in the variable in a text container with the surrounding $$ but use the X button in the Properties panel (consistent, also X button). Not only do you avoid typos that way (variables are case sensitive) but you can check the number of characters that will be displayed. Default length is 50, but that may be too low, in which case you have to edit this length.

Text wrapping

Often overlooked by developers: it is possible to have text wrapping in a TEB. You just have to activate the option 'Show Scrollbar' which is disabled by default: