Highlighted

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

Explorer ,
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.

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.

Views

51

Likes

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

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

Explorer ,
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.

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.

Views

52

Likes

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
Aug 03, 2020 0
Most Valuable Participant ,
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. 

Likes

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
Reply
Loading...
Aug 03, 2020 0
Advocate ,
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.

Likes

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
Reply
Loading...
Aug 03, 2020 0
Explorer ,
Aug 03, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Aug 03, 2020 0