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

Submit and Print Button


Level 2

May i know how do i post a "Print" script into an existing submit button sharing the same principles to validate mandatory fields?

So once a User clicks on the submit and print button, fields will be validated, printing will be triggered without having to display the print window and the email functioning as per normal?

please help. Thanks.
0 Replies


Level 10
You will need to hide the submit and print buttons.

Then create a new regulat button. On the click evnt of the new button you would cause the other two buttons to be pushed. Something like this:




Level 2
Hi Paul, thanks for the advice.

The submit button will validate and prompt users that there are mandatory fields not filled in, will the print button works the same too?

Can i also print straightaway without having to show the print window?


Level 10
By doing the submit 1st the validations will run before the print. I believe that if you pass all of the needed options in teh print command that you can print without that dialog but I am not 100% sure.


Level 2
Thanks, Paul. I managed with a validation dcript on the print button.


Not applicable
Pardon me for being the least familiar with this product, but I am in need of this same button action (submit only to validate required fields, and the trigger the print).

Paul - would you kindly give me more remedial instruction as to how to program the regular button to complete both tasks?


Level 10
The technique woudl be to have a print button and a submit button on the form doing their normal functions - then hiding thise buttons (making them hidden). Then adding a 3rd normal button (this will allow you to program on the click event) then writing code that will do something like this:

//Run validations

if (form1.execValidate()){

execute print command

execute submit command

} else {

app.alert("Validations failed");