cancel
Showing results for 
Search instead for 
Did you mean: 

add different colors to different cells of table

Former Member
0 Kudos

Hello everyone,

I have a table in an interactive form.

Subform10 -

| - Subform 11 -

| - TextField1[0]

- TextField1[1]

- TextField1[2]

Subform 10 is the Table Content and Subform 11 is the Table Row. I wanted to fill the background color of these fields with diferent colors, depending on the rawValue of the TextField itself. How can i do this, and in wich event should i put the code ?

I tried the fillColor but don't know where to put it.

thank you in advance,

Nuno Santos

Message was edited by:

Nuno Santos

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Nuno,

I tried to replicate your problem in my system, and what I suggest you is that in the this is what has to be in the script editor:

Setting for the script editor:

Show: initialize

Lanuage: formcalc

Run At: client

for example for textfield1[0} to have to code something like this:

$.fillColor="150,130,33"

here "150,130,33" is the color defined.

for example for textfield1[1] to have to code something like this:

$.fillColor="150,130,33"

for example for textfield1[2] to have to code something like this:

$.fillColor="150,130,33"

Or if you want to go for javascript then use

TextField1.fillColor = "150,130,33"

This would solve your problem.

Thanks,

kris

Former Member
0 Kudos

HI,

You can assign the color value in form ready event.Code the script on subform11.

Thanks and regards,

Pavan Meda