Is there a way to change txt field background color based on user entry.

michelej0221 02-07-2015

I need the background of a text field to change based on the users entry.  For example if the user enter R the background changes to red, G - the background changes to green, Y - the background changes to yellow.

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (1)

Answers (1)

XIIIX-inTVbY 07-09-2015

Insert JavaScript below on the [EXIT] event for the target textField

if (this.rawValue == "R")  {

     this.fillColor = "255,0,0";


else if (this.rawValue == "G")  {

     this.fillColor = "0,255,0";


else if (this.rawValue == "B")  {

     this.fillColor = "0,0,255";


should work fine..