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

Re-setting a Text Entry Box

New Here ,
Aug 11, 2021 Aug 11, 2021

Copy link to clipboard

Copied

Hello Everyone:

I need help re-setting the content of a Text Entry Box on the same slide. I have a numbers' project, which includes 10 buttons on the same slide. Each button represents a number which plays audio (name of the number).  Users will type (Text Entry Box -TEB) in letters the name of the number. If the name is typed correctly, the corresponding button is hidden. However, I would like (via Advanced Actions or other means) to reset the content of the TEB so that users can re-type the name. Once a number is hidden, I like users to continue with the rest of buttons without going to a different slide. Can someone help me with this issue?

 

Sincerely,

Views

67

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
community guidelines
Community Expert ,
Aug 11, 2021 Aug 11, 2021

Copy link to clipboard

Copied

What do you mean by 'resetting'?  Do you need to validate the TEB or not?  Probably that is the case,  but how did you set that up? How many attempts do you have for the TEB? Maybe this blog can help clarifying;

http://blog.lilybiri.com/text-entry-boxes-back-to-basics

It may be easier to use a Scrolling Text interaction instead of a TEB.

 

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
community guidelines
New Here ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

Thanks for replying Lilybiri. 

I read your blog and it clarified a lot of how to use the Text Entry Box. Thanks. However, my issue still remains.

1. Re-setting means deleting-erasing the content typed in the TEB and show a blank space (as default), so that users can retype their answer.

2. I had 10 buttons on one the same slide. The idea was to use the same TEB for all them. Via Advance Actions I would validate answers and change the content of the TEB depending on the button clicked. For example, if button for number one is clicked, the user can type one, One, or ONE. A feedback message is displayed depending on the answer.

3. Each button can be clicked as many times as needed. However, the TEB may accept five attempts for the correct answer.

4. I assigned the TEB with the variable NumberName. I also created a Null variable: v_null with an empty value (no number or letter).

5. I can't change the content of NumberName to v_null. It doesn't change the value.

 

I hope this makes a little more sense.

 

Sincerely,

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
community guidelines
Community Expert ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

This is a pain since quite a long time. You can reset the variable associated with the TEB without problems, but it will only appear changed when you reset the slide. That is one of the reasons I asked if you need really a TEB or if it could be replaced by a Scrolling Text interaction? From your description you are not using a validated TEB.

http://blog.lilybiri.com/scrolling-text-interaction-to-replace-text-entry-box

One drawback with that interaction is that you don't have the possbility to ignore case sensitivity as exists for a TEB.

 

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
community guidelines
New Here ,
Aug 16, 2021 Aug 16, 2021

Copy link to clipboard

Copied

Thanks Lilybri.

 

I'll try using the scrolling text.

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
community guidelines
Community Expert ,
Aug 17, 2021 Aug 17, 2021

Copy link to clipboard

Copied

Here is another idea,  by thinking bit out of the box. However it may not work if your project is a Fluid Boxes project. 

You told that you need to store the answers in user variables. If you insist on using the same TEB for multiple fields, that means that you have to transfer the value of the TEB associated variable each time to another variable. Rather cumbersome, and prone to typos....

 

Why do you insist to use the same TEB? Why not have a bunch of TEBs in the same location, each with their associated variable (which you can choose using the X button in the TEB properties)?  You hide all the TEBs, except the first one. Use the Success event of the TEB to hide the first TEB and show the next one.  It would also allow you to make sure that something has been entered in the TEB before allowing to fill in the next TEB? 

 

That solution would solve both problems: you don't need to transfer the TEB variable value to another variable, and the new TEB will have an empty field.

 

Just an idea. You can do everything with JS, but I largely prefer to use the packaged features of Captivate before adding JS in the toolbox (which is necessary in many cases).

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
community guidelines
Advisor ,
Aug 16, 2021 Aug 16, 2021

Copy link to clipboard

Copied

You can clear the text from the TEB using JavaScript.

 

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

 

Please note that this does not change the variable value associated with the TEB.

Change the nameOfTEB part to match the name of your TEB.

 

Hope this is helpful.

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
community guidelines
New Here ,
Aug 16, 2021 Aug 16, 2021

Copy link to clipboard

Copied

Thank you Stagprime.

 

I tried it and it cleared the TEB as you indicated (did not change the variable value). I appreciated your suggestion. However, it didn't solve the issue of using one submit button for multiple TEBs.

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
community guidelines
Advisor ,
Aug 17, 2021 Aug 17, 2021

Copy link to clipboard

Copied

LATEST

I thought you wanted one TEB for multiple buttons...?

 

Nonetheless, the rest can be done with JavaScript as well.

Let me paraphrase what I am seeing in my head based on your descriptions.

 

I get the idea that you press the "one" button and hear audio that speaks the word "one". This also sets the correct answer for the TEB. The learner then has to type the word "one" into the TEB as a response to hearing the word spoken. They can listen as often as they want but have only five guesses to spell it correctly.

 

Having one TEB and one submit button will involve a lot of  conditional statements to cover all the buttons one thru 10. You'll also need several variables to track the number of attempts on each number button.

 

Let me know if you're interested in exploring the JavaScript further.

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
community guidelines