Storyline’s data-entry fields allow you to dynamically collect information from your users, which can then be stored in variables, manipulated with triggers, and displayed on any slide or layer using references.
In this tutorial we'll take a look at how to insert data-entry fields, and how to use references to make the user-entered data appear when and where you want.
Inserting a Data-Entry Field
- In Normal View, go to the Insert tab on the toolbar.
- Click Data Entry, and select either Text Entry or Numeric Entry. (In a text entry field, learners can enter any alphanumeric characters. A numeric entry field accepts only numbers, decimals, and hyphens preceding negative numbers.)
- Click on the slide to add the field, or click and drag if you want to make the field a specific size. (You can always resize it later by selecting it and adjusting the handles just like you would for a text box.)
- If you like, customize the prompt (instruction) text that appears inside the field.
Two things happen when you insert a data-entry field:
- Storyline creates a variable to hold the data. It'll be either a text variable (if you inserted a text entry field) or a number variable (if you inserted a numeric entry field). You can view all the variables in your project by clicking the Manage project variables button in the lower-right of the Triggers panel.
- Storyline also creates a trigger, which sets the value of the variable to whatever the user types in the field when the control loses focus. (To learn more about managing triggers, take a look at this tutorial.) Note: The Enter key will add line breaks (returns) to text that the user types in the field if the field is tall enough to accommodate more than a single line of text. However, if the field is only tall enough for a single line of text, the Enter key will assign the user's text to the variable.
Renaming a Data-Entry Field
When you insert a data-entry field onto a slide, it'll appear in the timeline with a default name (Text Entry or Numeric Entry). It can be useful to give it a more intuitive name. This makes it easier to choose the correct object when you're applying triggers or working with other features in Storyline. There are a couple of ways to rename a data-entry field. You can right-click it, and select the Rename option from the shortcut menu that appears.
Or, you can use the timeline to rename objects, including data-entry fields.
Changing the Variable Name
When Storyline creates the variable for your data-entry field, it assigns a default name (TextEntry or NumericEntry) to the variable. (This name is separate from the name assigned to the actual data-entry field described above.) If you have multiple data-entry fields in your project, you’ll likely find it easier to manage them if you give their variables easily recognizable names. Here's how to rename a variable:
- Click the Manage project variables button in the Triggers panel.
- Select the variable you want to rename and click the Edit button (the icon that looks like a piece of paper with a pencil), or simply double-click the variable.
- When the Variable dialog opens, type a new name.
- Click OK.
Using a Variable Reference to Display the User-Entered Data Somewhere in Your Course
Any data you collect with a data-entry field can be displayed anywhere in your course. You just need to insert a reference to the data-entry field's variable. Here's how:
- Place your cursor within the text of an existing button, shape, caption, or text box.
- On the Insert tab, click Reference.
- On the References window, select the variable you want to reference.
- Click OK.
As a placeholder, Storyline inserts the variable name, flanked by percent signs, into your button, shape, caption, or text box. In your published course, this placeholder text will be replaced with whatever data your users type in the data-entry field.
- Note: You can format the placeholder text any way you like, using the formatting options on the Home tab. Any formatting you apply to the placeholder text will also be applied to the actual value of the variable when it is displayed to your users during playback. To learn about the various formatting options, take a look at the font and paragraph tutorials.
Changing Font Formatting
After inserting a data-entry field on your slide, you can change the font formatting for the text that users will enter. Here’s how:
- Select the data-entry field on your slide.
- Go to the Home tab, and use any of the following Font formatting options:
- Font Size
- Font Color
- You can also change the horizontal alignment (left, center, right).
You can apply some additional formatting options to the prompt (instruction) text in the data-entry field, such as bold, italics, underline, highlight color, and even bullets. However, these formatting options will not apply to the user-entered data.
And, as noted in the section above, if you choose to display the variable reference on a slide or layer for your users to see, you can format the placeholder text, using any of the font and paragraph options on the Home tab.
Applying Styles and Effects to a Data-Entry Field
- Select the data-entry field on your slide.
- Click the Format tab.
- Now you can click on any of the ready-made Shape Styles, or choose your own Shape Fill, Shape Outline, and Shape Effects by using the options on the ribbon. For even more flexibility, click the small arrow in the lower-right corner of the Shape Styles section of the ribbon to access the Format Shape window.
The colors available on the Format tab are controlled by your project's design theme. You can learn how to customize the colors in your design them here.
Deleting a data-Entry Field
To delete a data-entry field, simply select it, and click the Delete key on your keyboard. When you delete a data-entry field, the variable and trigger that were automatically created with you data-entry field will also be deleted.
Using a Data-Entry Field to Trigger Actions or Perform Calculations
Because Storyline stores user-entered data in variables, you can use triggers and conditions to perform specific actions based upon the data that a user enters. Similarly, if you are using a numeric entry field, you can use triggers and conditions to make mathematical calculations based upon the value that a user enters. To learn how, check out this tutorial.
Converting to a Freeform Text-Entry Question
After adding a data-entry field to a slide, you can, if you wish, convert the slide to a text entry question, so that you can evaluate it as part of a quiz. To learn how, review this tutorial. It is important to note that, although you can have as many data-entry fields on a slide as you want, only one data-entry field per slide can be evaluated as part of a freeform text entry question.