I am working on a form which we use for recording service visits out in the field. Form fields are drop down boxes with a range of GOOD FAIR and POOR. On the PC my custom validation script runs which changes the background color of the field depending on the selected value. This does not work on iOS devices though. Can someone help me edit the validation code to work within the restrictions of iOS Acrobat Reader App?
event.target.fillColor = color.yellow;
else if (event.value=="POOR")
event.target.fillColor = color.red;
else if (event.value=="GOOD")
event.target.fillColor = color.green;
else event.target.fillColor = color.white;
I can't seem to find which functions are supported and which are not. I found a developer guide which suggested that event and target classes are supported, but no mention of fillColor.
I can't seem to find which functions are supported and which are not.
Welcome to the club... Even the documentation that you can find can't always be trusted. It's mostly a matter of trial-and-error. Take into account that the vast majority of things is not going to work on mobile devices at all.
Glad to know I'm not the only one...
You would think that something as basic as fillColor would be supported, but... alas. Any suggestion on a work around by chance?I just need to signify any of the fields that are fair or poor.
Try other properties, like the text color or the stroke color. Maybe you'll luck out.
By the way, the app that has the most support for scripts on iOS devices is PDF Expert by Readdle, not Adobe Acrobat/Reader.
try67 last question i promise!
Had some limited success with red and green text color changes, ut it seems to not be recognizing "Yellow" as a color. any idea how I can get around this? is there a function to define the color outside of the pre-built ones?
My guess would be that it only supports RGB (and maybe gray-scale) colors. The color.yellow constant returns a CMYK value, so that's maybe why it's not working... To specify a custom color use a color array, like this:
["RGB", 1, 1, 0]
Notice the values are between 0 and 1, not 0 and 255 (or 1 and 256) like in other places.