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

IRMJP

08-09-2015

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

sp215

09-09-2015

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;