Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Asking for User Name

Explorer ,
Aug 24, 2016 Aug 24, 2016

Using Cap 9 for output as an exe file.

I need to ensure that a learner has entered some text (their name) in a text entry box. 

So far, I've not been able to make this work.

The default value for my text field is set to "Enter Your Name" and I can detect if the user simple clicks the Submit button by comparing the value of my UserName variable with the default value of the TEB. I can also detect if they have changed the default text in the TEB before clicking the Submit button.

The user only gets one shot at this. If they don't change the text in the TEB and click the Submit button, they don't have the option to correct their mistake and change the text to try again.

What must I do to allow the user to have a second chance at entering valid text in the TEB?

290
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 24, 2016 Aug 24, 2016

As long as the output is interactive, this will work. If you published to MP4, the TEB wouldn't work at all, but EXE is indeed a SWF output and this approach will work.

Translate
Community Expert ,
Aug 24, 2016 Aug 24, 2016

An alternative to checking a default text is to use a 'Null variable' as explained in this old post:

Where is Null? - Captivate blog

As for giving another chance, you have to rewind the playhead a couple of frames back, which can be done with the same action as the check for an entry:

Expression cpCmndGotoFrameAndResume = cpInfoCurrentFrame - 5

The idea is to have the playhead again in the active part of the TEB.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 24, 2016 Aug 24, 2016

Thank you for your response.

Will this approach work in all available types of output?

I am presently publishing as an EXE file so using Flash. Only doing this because I have a group of learners who can't use my Captivate Prime LMS to access the lesson and we need to produce a certificate with their name to document the training.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2016 Aug 24, 2016
LATEST

As long as the output is interactive, this will work. If you published to MP4, the TEB wouldn't work at all, but EXE is indeed a SWF output and this approach will work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources