Skip to main content
Known Participant
July 28, 2015
Answered

How can I have a variable as the default text in a text entry box?

  • July 28, 2015
  • 1 reply
  • 568 views

I have Captivate 7. I would like a user variable entered at the beginning to be the default text in the TEB so that when they get to the slide with the TEB, they have to erase what is there to enter something else. Is this possible without a widget? Thanks.

This topic has been closed for replies.
Correct answer Lilybiri

No, you cannot control what is displayed in a TEB. In the latest version of Captivate 8 this is possible when you use the Scrolling Text (TextArea) interaction as alternative. For SWF-output, Captivatedev (Jim Leichliter) had a widget, but he is out of business. Isn't the 'default text' sufficient for you?

1 reply

Lilybiri
LilybiriCorrect answer
Legend
July 28, 2015

No, you cannot control what is displayed in a TEB. In the latest version of Captivate 8 this is possible when you use the Scrolling Text (TextArea) interaction as alternative. For SWF-output, Captivatedev (Jim Leichliter) had a widget, but he is out of business. Isn't the 'default text' sufficient for you?

simulatorAuthor
Known Participant
July 28, 2015

Well, it's a simulation for a program that will default the user's name, but they will need to change it to enter in someone else's name. But I'll just have it blank for that slide (after they've clicked on the field) and they can enter the new name. It won't be perfect but it's okay. Thanks!

RodWard
Community Expert
Community Expert
July 29, 2015

You could fudge this by having the user's name displayed as a variable inside a Smart Shape button that is placed over the top of the TEB input box. Format the button so that it's background is the same colour as the background of the TEB and set the stroke to be off or of the same colour.  Set the Smart Shape button's ON Success Event to execute a Standard Action that both Disables and Hides the Smart Shape button.

So the text in the button will look like it is in the TEB but really it's just sitting over the top of it.  When the user clicks there to select their name it will disappear and leave the cursor in the TEB instead.

It's not a perfect solution, but it might be close enough.