Copy link to clipboard
Copied
Hello,
I am creating a form where I have text fields that I want the text color to change when the number entered is > 9, = 10 or more and <20. I have tried other scripts shown in the help forum but those didn't work see below
if(event.value <= 9){
event.target.textColor = color.black;}
else if (event.value == 10){
event.target.textColor = color.yellow;}
else if(event.value >= 11){
event.target.textColor = color.red;}
Use it as validation script.
Copy link to clipboard
Copied
Where does you use the script?
Copy link to clipboard
Copied
I tried it in the custom calculation script and in the document javascript neither worked.
Copy link to clipboard
Copied
Use it as validation script.
Copy link to clipboard
Copied
That worked thank you so much for your help!!
Copy link to clipboard
Copied
Your script doesn't cover all numbers between 9 and 10, and 10 and 11...