Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Level 1
michelej0221
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
michelej0221
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
View profile
michelej0221
Level 1

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
XIIIX-inTVbY
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
XIIIX-inTVbY
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
XIIIX-inTVbY
Level 1

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..