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

How Do I Clear a Text-Entry-Box after the First Submission?

Explorer ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

I've put a text-entry-box into a course, giving the learner three attempts to answer correctly before I just give them the answer.  I'd like to be able to clear their answer out of the text entry area and I tried to do that with an advanced action that sets the variable (Answer) for the box with Assign =  " " when the learner selects the "Close" button on the popup that appears when the answer is wrong (see below).

 

Assign Screenshot.PNG

That however does not work.

 

Any ideas?

Thanks

Jay

 

P.S. I made my own "submit" button for the text-entry-box...I didn't use the one attached to it by Captivate.

Views

301

Translate

Translate

Report

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

Advisor , Aug 03, 2020 Aug 03, 2020

You might try this.

You would need to set the  onSuccess action of the button to  Execute JavaScript

 

document.getElementById("Text_Entry_Box_1_inputField").value = "";

 

Then change the  Text_Entry_Box_1_  part to match the name of your text field.

Do not remove the underscore inputField at the end.

Be sure to remove the value of the variable associated with the TEB as well.

 

Let me know if you have further questions about this.

Votes

Translate

Translate
Community Expert ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

The only solution is to re-emter the slide. I have explained this workflow when presenting about the Timeline in 2017-2018  (two conferences) and I mention it in a recent post:

http://blog.lilybiri.com/replay-or-reset-slide

Annoying, there are more problems with the TEB. Another solution would be to use the CpExtra widget by InfoSemantics. 

Votes

Translate

Translate

Report

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
Advisor ,
Aug 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

You might try this.

You would need to set the  onSuccess action of the button to  Execute JavaScript

 

document.getElementById("Text_Entry_Box_1_inputField").value = "";

 

Then change the  Text_Entry_Box_1_  part to match the name of your text field.

Do not remove the underscore inputField at the end.

Be sure to remove the value of the variable associated with the TEB as well.

 

Let me know if you have further questions about this.

Votes

Translate

Translate

Report

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 03, 2020 Aug 03, 2020

Copy link to clipboard

Copied

LATEST

That did it!  Thanks much for the help!  

I've gotta put the effort into working with JS...it's clearly the answer for alot of problems.

Thanks again.

Jay

Votes

Translate

Translate

Report

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