Change text color of a value depending on an other fields value
Hi, I like to create an pdf form with acrobat. for this i have a table with different fields. depending on the value entered in p.e field "A" the text of field "A". "textA" an "textB" should colored red, etc. (like in the table below)
| Headline 1 | Headline 2 | Headline 3 |
|---|---|---|
| A | textA | textB |
| 1 | text1 | text2 |
| I | textI | textII |
I have been using the forums to help me answer the question above and I have managed to create the code below, but it's not working
if (event.value=="a") { event.target.textColor = color.red;
this.getField("textA").textColor = red;
this.getField("textB").textColor = red; }
else if (event.value=="b") { event.target.textColor = color.red; {
this.getField("textA").textColor = red;
this.getField("textB").textColor = red; }
else if (event.value>="0") { event.target.textColor = color.blue; {
this.getField("textA").textColor = blue;
this.getField("textB").textColor = blue; }
else if (event.value=="I") { event.target.textColor = color.green; {
this.getField("textA").textColor = green;
this.getField("textB").textColor = green; }
else if (event.value=="II") { event.target.textColor = color.green; {
this.getField("textA").textColor = green;
this.getField("textB").textColor = green; }
else event.target.textColor = color.black;
Can anyone suggest what I might be doing wrong?
