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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Is there a way to change the font color in the drop donw-list field when the user selects word.

Avatar

Level 2

Help me, please!
I must select the drop donw -list the word and change the font color when the user selects . For example , if the user selects word Disapproved change font color to red , select Approved changes color to green.

2 Replies

Avatar

Not applicable

Good afternoon,

Try the following:-

if ($.boundItem(xfa.event.newText) == "Disapproved") {

  if (xfa.host.version < 😎 {

  this.resolveNode("$").fontColor = "255, 0, 0";

 

  else {

  var CaptionColorBackup = this.resolveNode("$").caption.font.fill.color.value;

  this.resolveNode("$").font.fill.color.value = "255, 0, 0";

  this.resolveNode("$").caption.font.fill.color.value = CaptionColorBackup;

  

if ($.boundItem(xfa.event.newText) == "Approved") {

  if (xfa.host.version < 😎 {

  this.resolveNode("$").fontColor = "0, 128, 0";

 

  else {

  var CaptionColorBackup = this.resolveNode("$").caption.font.fill.color.value;

  this.resolveNode("$").font.fill.color.value = "0, 128, 0";

  this.resolveNode("$").caption.font.fill.color.value = CaptionColorBackup;