Skip to main content
Participant
December 8, 2023
Answered

Change font color in PDFs form

  • December 8, 2023
  • 1 reply
  • 884 views

HI I want to be able to have number change colors if the value is 0 its green and anything above is red. Can this be accomplished in the properties of a form that needs to have numbers. Please advise. 

This topic has been closed for replies.
Correct answer Nesa Nurani

You will have to use a script to achieve that, in the field properties under 'Validate' tab → 'Run custom validation script' enter this:

event.target.textColor = event.value > 0 ? color.red : color.green;

1 reply

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
December 8, 2023

You will have to use a script to achieve that, in the field properties under 'Validate' tab → 'Run custom validation script' enter this:

event.target.textColor = event.value > 0 ? color.red : color.green;

Participant
December 8, 2023

You are a life saver!!!! THank you Nesa!