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

Need help changing fill color based on selection in livecycle

Avatar

Avatar
Level 1
jojod37548708
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
jojod37548708
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
jojod37548708
Level 1

26-09-2015

I have read and read every page i can find and i still cannot figure out a way to create a javascript for changing fill color in a form i create. I am not even sure where the javascipt goes but know i need one.

So i have a form that i would like to show customers what the shade looks like when they select is so they know exactly what they are getting. Seeing as there are so many variations of colors and i only offer a few.

The colors in the drop down are;

Black

Maroon

Red

Pink

light pink

Blue

light blue

purple

Clear (no fill)

white

orange

yellow

green

beige

If someone could explain to me exactly how to write this and where to put it that would be so great! I have to get this order form out in a few days. Or if there is a better easier way to do this please let me know

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

28-09-2015

Hi there,

Maybe a tool will help you get the colors that you wish to set for the field.

Use this tool online to get the RGB settings

Color Slider (RGB to hexidecimal converter)

Then you can use a switch statement in the exit or change event of your dropdown list which will set the color wanted on selection

Here is a sample/tutorial of a switch statement in JavaScript, you can also use normal if statements, it will end with the same result

JavaScript Switch Statement

To be able to set a color fill for a field, you can use any of these options in LiveCycle

http://forms.stefcameron.com/2008/03/14/field-background-color-fill/

Hope this will help ya!