Copy link to clipboard
Copied
I have made one form which requires validation before signing....... everything is working good........ clicking validation button pops up a message about which fields need to be filled (if any require fields are not filled by user)..
Now i want to ask is it possible in pdf form that instead of pop up message..... the fields which are not filled by users are highlighted in red there itself instead of a popup message (bcoz the formatting of pop up is very bad and i am not able to format the popup mssg.. they come up very messy).
Copy link to clipboard
Copied
There are three colors that you can set for a field:
1. text color
2. background color
3. border color
When you have the "highlight fields" function active, the background color will only be shown when your field is active (because only one field can be active at any time, only one field would show your "this field needs to be filled out" color). I usually change both the border color and the highlight color, so even with the highlight function being active, the border color would still show.
You can change the border/background color via the Field.strokeColor and Field.fillColor properties. In your validation script, you would access these via the "event.target" property:
if (something == true) {
event.target.fillColor = color.red;
event.target.strokeColor = color.red;
}
else {
event.target.strokeColor = color.green;
event.target.fillColor = color.green;
}
Copy link to clipboard
Copied
I was not looking for something this
Copy link to clipboard
Copied
i mean i was actually looking like the image in the above post...... if validation fails then such mssg should appear above or below the field
Copy link to clipboard
Copied
In that case, you have to add a read-only field that you show/hide depending on the state of your actual (validated) field. You do this via the Doc.display property: Acrobat DC SDK Documentation
Find more inspiration, events, and resources on the new Adobe Community
Explore Now