I have been creating a software simulation with text entry boxes. I have a red square behind the data entry box, which creates a red border around it. I would like this border to disappear as soon as the user starts typing in the box. Currently the value doesn't change until control loses focus (by default). Is there a way to alter this so that the value is updated every time a key is pressed?
What I want is a trigger that says something like "Set textentry1 equal to the typed value when user presses any key."
I have tested this scenario with a text entry box and a red rectangle shape behind it. What I did was add a trigger to the rectangle shape to Change the state of Rectangle to Hidden when the user clicks within the text box.
I am facing the same problem as AnDrew Hopkins mentioned above. I was using the same concept as you shared here but i want something different like, Change state of rectangle when user typed any key not just clicking on box....
As Andrew mentioned above - clicking on a key and looking to capture that they clicked a particular letter you'd have to let the "text entry lose focus" meaning that they likely clicked outside the text entry or used the "enter" key to submit the text. If you are only looking for them to press any key - not necessarily enter it into a text box, there is a trigger for a key press and you would need to choose which key would submit that entry. There is not a "wild card" option to allow them to press anything.
create a shape with a visited state and put it off the stage. Set a trigger to change state of offstage object to visited when user clicks text entry box - then set another trigger to change state of submit button to normal when state of offstage object is visited.
8 Replies
Hello Andrew,
I have tested this scenario with a text entry box and a red rectangle shape behind it. What I did was add a trigger to the rectangle shape to Change the state of Rectangle to Hidden when the user clicks within the text box.
Attached is a file to look at.
Let me know if this helps.
Hello Emily,
I am facing the same problem as AnDrew Hopkins mentioned above. I was using the same concept as you shared here but i want something different like, Change state of rectangle when user typed any key not just clicking on box....
Thanks in Advance :)
Hi Amar,
As Andrew mentioned above - clicking on a key and looking to capture that they clicked a particular letter you'd have to let the "text entry lose focus" meaning that they likely clicked outside the text entry or used the "enter" key to submit the text. If you are only looking for them to press any key - not necessarily enter it into a text box, there is a trigger for a key press and you would need to choose which key would submit that entry. There is not a "wild card" option to allow them to press anything.
You could use a freeform interaction for press a key and set the feedback layers to both do what you want.
Hi Ashley and Phil
Thanks for your reply i tried but not able to do it, here is my story file:
Right now triggered used as shown below:
Change state of Submit button when Variable change "text entry box" not equal to blank.
Its working fine but user need to click outside or press enter button, didn't change the states instantly and i don't want this.
I want submit button should enable when user type any text in text entry box, no need to press enter or click outside the box.
Thanks in advance :)
Hi Amar
create a shape with a visited state and put it off the stage. Set a trigger to change state of offstage object to visited when user clicks text entry box - then set another trigger to change state of submit button to normal when state of offstage object is visited.
See updated file
Hi,
I am facing a similar issue.
I need to activate the submit button as soon as the user types anything in the text field.
Currently, the button gets activated after the user clicks outside the text field.
Any solution for this ??
Hi Robin,
Sorry to hear you've run into a similar issue.
Looks like Wendy shared a solution above to adjust the submit button back to normal.
If you have a .story file you'd like to share for us to take a look, we'd be happy to do so.
This discussion is closed. You can start a new discussion or contact Articulate Support.