Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this lesson we will take a look at how we can use a text entry area to gather some information from the user. We will be using the Chapter 7_f file that we developed earlier in this chapter. If you don't have it open, please open it now and let's go to slide number 1. Although slide number 1 looks crowded, remember that there are image rollover areas here. So these images that are right in the middle don't actually show until you rollover these areas. I'd like to get the name of the person who is watching the presentation, so that I can use it in other text areas within the presentation.
To do that, I'm going to use a text entry box. Create a text entry box by clicking the Text Entry Box tool now. The text entry box appears and it looks kind of jumbled. I'd like to explain what the different pieces are, although we won't be using all of them right now. First we need to name the item. We will call this customer name. Hit Enter to accept the name. Captivate will automatically substitute and underscore for any spaces.
Let's go to the top of our Properties and take a look at the General area. The General category contains some specific controls for text entry boxes. At the top, you will see the default text. Type Valued Customer here, making sure to capitalize Valued and Customer. Hit Enter when complete. You will notice an option here to retain the text. This is important because this enables us to capture the text and then use it elsewhere in the presentation.
I'd like to do that and in order to use it I need to associate this text with a variable. I'm going to do that by clicking this Variable button here and we'll call the variable customer_name. I've typed the underscore this time, and then click OK. Now, you will see the variable has changed to customer_name. This will allow us to access what the customer has put into this field later on in the presentation. You will see a checkbox near the bottom that says Validate User Input.
If I wanted to, I could enter correct entries here. Many people will use this field in the first slide of a presentation to build password-controlled access to their presentations. In this case however you'll be hard coding the password into the correct entries area. To do so, click the plus sign here and you can enter the text for any correct entries. If we wanted the customer to type the word hansel, then we'd just type hansel. If I want it to be case-sensitive, I can enable this option as well.
In this case, I'm looking to capture the customer's name and I don't know what it is initially. So there are no correct entries. I'm going to disable Validate User Input. We have a Submit button that goes to the right of that text entry area. We can move it off to the right and we can extend the size of the text entry are so that we can read all of the copy. I have a hint that will pop up when the customer puts their mouse over the text entry area. Let's change what the hint says.
double-click, select all with Command+A or Ctrl+A, and type "Please tell us your name." Hit the Esapec key when complete. Let's go back to the text entry box for a moment and scroll down to the action area. You'll see that a shortcut has been automatically added here and this is the Enter key. This will trigger the Submit button to capture the information. We can control what happens after a person enters information.
What I'd like to happen now is to go to slide number 2, which is the Store slide. So we will say Jump to slide, and slide 2, Store, automatically appears. I could of course choose any other slide in the list. Let's go to slide number 2 now and see how we can use the information that we have just captured. We have two text captions and I'd like to use the customer's name in those captions. Select the Top Quality Baskets caption and double-click and put your cursor before Top Quality Baskets.
Scroll down under Format and you'll see an X right there. That X allows you to insert a variable into a caption. Click it now. We're using a user variable but there are other variables such as system variables. Currently, I want to use the user variables and if I look at my list it consists of customer_name and another variable called Text_Entry_Box_1. When we created our text entry box, Captivate automatically built a variable called Text_Entry_Box_1. We will delete it in a minute, but for now I want to use the one called customer_name.
Let's set the Maximum Length to 30. Before we leave here, let's delete that extra variable. Click on Variables to do that. You'll see Text_Entry_Box_1 and we will remove it. Then we are done. Having entered our variable into the caption, we can click OK. This inserted the variable not exactly where I was hoping it to go. Select the variable and cut it with Command+X or Ctrl+X and then stick it before Top Quality Baskets.
You can paste it with Ctrl+V or Command+V. Now type an apostrophe, S, and Return. Let's preview the results, shall we? I'd like to preview the entire project to see the full flow. There is that text area. When I move my mouse over it, it says "Please tell us your name," so I will type my name and I'll Submit. Now, I am already hovering over Fragrant Bouquets, but we know that we just added a variable to the text caption that's sitting near the baskets.
Now I see it says James Lockman's Top Quality Baskets. How's that for personalization and interactivity? Let's close our preview and we will add the variable to Fragrant Bouquets. Double-click up here and simply select the entirety of that phrase, copy it with Command+C or Ctrl+C, double-click in front of Fragrant Bouquets, and paste. With that change having been done, let's save. Choose Save As and this time we'll call it Chapter 7_g.
It's also a way for you to use that information in calculations, use that information to control the flow of the presentation, and to personalize the presentation for that user.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 99162 Viewers
80 Video lessons · 141795 Viewers
59 Video lessons · 60163 Viewers
52 Video lessons · 73300 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.