Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Font color based on selection
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Font color based on selection

 Post Reply Post Reply
Author
firecop1 View Drop Down
New Member
New Member


Joined: 14 Nov 2015
Location: New York
Points: 1
Post Options Post Options   Quote firecop1 Quote  Post ReplyReply Direct Link To This Post Topic: Font color based on selection
    Posted: 14 Nov 2015 at 8:30pm
Greetings. I am new to PDF development. 
I have a drop down list that contains 3 values "Pass", "Fail" and "N/A". If the value chosen is "Pass", I would like the font to change to green. If the value chosen is "Fail", I would like the font to change to red. 
Can anyone assist me in accomplishing this?

Thanks in advance. 
AJ
Back to Top
Sponsored Links


Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 617
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 2015 at 10:22pm
Use this code as the field's custom validation script (make sure you tick the option to commit the selected value immediately under Properties - Options):

if (event.value=="Pass") event.target.textColor = color.green;
else if (event.value=="Fail") event.target.textColor = color.red;
else event.target.textColor = color.black;
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.