Skip to main content
Boardfran
Participating Frequently
August 10, 2017
Answered

How to change background color through validation script on ipad/ios

  • August 10, 2017
  • 1 reply
  • 2113 views

Hello,

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?

if (event.value=="FAIR") 

    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.

Thanks!!

This topic has been closed for replies.
Correct answer try67

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.

1 reply

try67
Community Expert
Community Expert
August 10, 2017

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.

Boardfran
BoardfranAuthor
Participating Frequently
August 10, 2017

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.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 10, 2017

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.