Dynamically change the text colour in a text entry field

Feb 10, 2016

I have a text entry screen where users complete a few text-entry boxes. I want to be able to validate their entries and to colour-code valid entries as green and invalid entries as red. Is there a way to change the colour of the text in a text entry field on the fly (i.e. when the control loses focus)? I see there are no states for text entry fields, so I can't go that route...

2 Replies
Leslie McKerchie

Interesting question Andrew and I'm curious if someone in the community has created something similar and can assist you with your design need.

I know that we have a great thread here to evaluate multiple fill in the blank questions that is always a great reference, but I'm not aware of anyone adding an immediate feedback element to this.

 

Phil Mayor

You could use javascript to bold or underline, if I remember correctly it THE TEXT CONTROL DOES NOT SUPPORT COLOUR CHANGES USING HTML TAGS.

Oops

But in the data entry field it would show the HTML tags

When the control loses focus ou could display a text box with a reference with a colour change(via states)  and either add an edit button or icon to hide the textbook and show the data entry field again.

 

 

This discussion is closed. You can start a new discussion or contact Articulate Support.