1
I have a pdf form that already has a javascript that if it is inserted a value different from the predetermined one the font turns red, and if it is within the limits determined the font turns green.
I would like to insert three fields of counters, one with the number of fields in red and the other with the number of fields in green, and a third field with the total number of fields (green + red). You can do it ?
Code I use to do the coloring.
var v = Number(event.value);
if (v>=10.720 && v<=10.780)
event.target.textColor = color.green;
else event.target.textColor = color.red;
Artur, ter tem. But it would be easier to help you if you post your code (html and js).
– DiegoSantos
pdf form? How would that be? News for me.
– Sam
Diego, the code I use is this one: var v = Number(Event.value); if (v>=10.720 && v<=10.780) Event.target.textColor = color.green; Else Event.target.textColor = color.red; then needed to create a new code to count the amount of fields in red and the amount of fields in green.
– Artur
@Arthur edits and asks with your code. I’ll put it for you, but do it next time.
– mutlei