Expand my Community achievements bar.

Font Change

Avatar

Level 2

Hi All,

I have design a one page form. All the texts (label, text and dropdown) in blue font. However I need to change the font color based on some selection.

Is it possible to change the entire font color and font type dynamically.

Thanks

sivamaddy

1 Reply

Avatar

Level 2

ADD THIS SCRIPT FOR THE COLOR:

if(TextField1.rawValue = "EXAMPLE")

{

  TextField1.font.fill.color.value = "233,24,0";

}

else

{

  TextField1.font.fill.color.value = "0,0,0";

}

THIS FOR THE WEIGHT:

if (TextField1.rawValue = "EXAMPLE")

{

     TextField1.font.weight = "bold";

}

else

{

     TextField1.font.weight ="normal";

}

OR THIS FOR THE POSTURE:

if (TextField1.rawValue = "EXAMPLE")

{

     TextField1.font.posture = "italic";

}

else

{

     TextField1.font.posture = "normal";

}