Resetting the text entry field

Apr 17, 2023

Hi Heroes.

I would appreciate your help. I'm building a software sim in which a user has to follow a process where they need to click or enter text to go to the next slide and finish the specific assignment. When they come to the end, they are offered to click a 'Try again' button which then takes them to the first slide and they can practice it again. 

Text entry fields retain what was typed in them previously but that is sometimes not visible to the user. For example, if their task is to write 'start' in the text entry box, when they write that and press enter, it is incorrect because the text entry basically has 'start start' and it won't progress to the next slide. This first start is not visible right away, and they need to delete it first and then write it again. I say 'sometime' not visible, because this 'start' from the previous go is visible and haven't figured out the logic when it is shown. 

How do you think I could solve that?

Thank you. 

1 Reply
Judy Nollet

A text-entry field is automatically associated with a text variable.

  • By default, the variable for the first text-entry field is called "TextEntry." Subsequent fields get variables with that name followed by a number (e.g., "TextEntry1"). However, you can rename those variables so they're more meaningful. 

In addition to adjusting the variable via entering something else in the text-entry field, you can adjust the variable with a trigger.

For example, in your situation, you could have a trigger associated with your "Try Again" button that adjusts the value of the variable so it's blank.  Just be sure that trigger comes before the trigger that jumps to another slide, because a trigger can't run if the program has already left the slide.