Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to add Submit button-like features to the Print button ?


Not applicable
I have a Print-only form with a Print button. I want to add the following features to the Print button (which simply calls by default)....

1. Have it check for empty, required fields (this I have actually already done using a modified version of the HighlightRequiredFields example).

2. Run the validation scripts against each field and detect their return value and stop if one fails that is marked as an "error".

3. Run a pattern test against each field to check it against the validation picture clause and stop if it fails and is marked as an "error".

This is obviouslly do-able since the Submit button is doing it down in the bowels of it's hidden code. I'd like to be able to bundle this into a re-usable script, and not write field or form specific validation scripts.

Any clues ?

0 Replies