I'm trying to make a form that changes color based on input from a field. For example, if my "B" field is 100 then my "actual" field will display the text in red if the number input is in the range of (100*0.95 to 100*0.96)
Here is my attempt but it doesn't seem to work. Any pointers will be awesome thx
var lowrange = this.getField("B").value * 0.95;
var highrange = this.getField("B").value * 0.96;
var actual = event.value;
if (actual>=lowrange && actual<=highrange)
event.target.textColor = [ "RGB", 1, 0, 0];
event.target.textColor = [ "G",0];
The code looks fine, but where did you place it, exactly?
I tried to place them both in custom calc and in custom validation script and neither works. It's weird because it works if I just do (actual>=lowrange) but if I add in another range it stopped working. Been playing around with it for a few hours but can't figure out what's wrong
Does this field have a calculated value, or one entered by the user? Are there any error messages in the JS Console when you use it? Can you share the file with us?
Works fine for me. Do you use any other software to open the file? How do you enter a number in 'Actual' field?
Works fine for me, too.
I'm using adobe acrobat pro. The number in the "actual" field is entered manually
It worked. All I had to do was restart my computer -__-