Is it possible to add class tags onto form fields? I need a function that highlights empty fields on a form that are indicated that they should be highlighted when empty, so not all empty fields, just the ones indicated. If a class tag or some other method could be used, and then loop through all fields and highlight those with the tag, that would greatly simplify the way we are currently doing it.
I've made a good form with examples for validation, reset and multiple other functions.
You can use this form template for your needs
Thank you for your response. Sorry I need to clarify, the highlighting is not for validation, it is to be printed on the completed PDF for end-users to know what fields they need to complete by hand. We need to change the fill color of the fields so that they print with the highlighting. My question is whether a class can be applied to fields so that we can access and apply a fill color to all fields with that class.
Well the functionality for validation can still be used for your needs. If you change a little bit the code, just to change all the field's color, you don't need to verify if validation script returns a null field, you can just print once the validation code has run.
The validation script will look for all fields with null value and change their borders to red as needed.
Otherwise, maybe another way would be having a function like ChangeColorField like in my PDF and call that function on pre-print event of each fields you want to change the fill color.