I want to highlight or color a field when it's empty, how do you do it?
I've been trying out this formula but I think it's not correct because there's a Syntax Error:
var a1 = this.getField("FirstN");
if (a1.value == null)
a1.style.backgroundColor = "yellow";
You have quite a lot of errors there... Try this code (as the field's custom validation script):
event.target.fillColor = (event.value=="") ? color.yellow : color.transparent;
This works great in Acrobat Pro, but the field colors won't change in Acrobat reader which is were most users fill out the form. Is there a way to code this in Pro so that the field colors will change in Acrobat reader?
It will work exactly the same in Reader. If you don't see it working then make sure to disable the fields highlighting in the application.
I have disabled the highlighting fields on my desktop in Acrobat pro and I have saved the file. It works great on my desktop. All the empty fields appear yellow until they are filled in and then they turn transparent. But when I open the file in acrobat reader on my android phone or my ipad all the empty fields appear yellow, and when I enter info into the field they stay yellow and I want them to turn transparent. I cannot see anywhere to turn off field highlighting on my android or ipad. Any suggestions? Thanks
You didn't mention this was on a mobile device... I'm not sure you can turn it off there, and even if you did it's not likely that a script will work there, I'm afraid.
Field highlighting is a personal preference, for your device only. It doesn't affect what others see, so you need to test both with and without.