Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Print Button Options Needed ASAP

Avatar

Level 2

I have a form that I create with tons of fields. Right now I have an print button for the page to be printed with all the fields. But I was wondering if there was an script or option to have another print button print the form in another state.

I.E. The form will be printed with all the fields with the 1st print button, but on the 2nd print button it can either print the form in a blank for or print another form located on the server.

Please advise..... thank you.

1 Reply

Avatar

Level 10

Hi,

This would depend on the number of pages in the form.

You could copy each of the pages to a new page. So that you would have page1 and page1a; page2 and page2a; and so on.

Then set the presence of all of the "a" pages to hidden, so that the user does not see them at runtime.

The user fills out the form and hits the regular print button and the form and data will print out.

The print blank form button would need script to show/hide the pages first. Click event:

page1a.presence = "visible";

page2a.presence = "visible";

page1.presence = "hidden";

page2.presence = "hidden";

print script

page1.presence = "visible";

page2.presence = "visible";

page1a.presence = "hidden";

page2a.presence = "hidden";

The form would need to be saved as dynamic AND it means that you have to maintain the form objects in two locations/pages.

Good luck,

Niall