Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

hide button for print

Avatar

Level 5

Hi All.

In my form I have a button and I would like to hide it when I print the form. I select the button and go to the Object > Field tab. Then in a presence dropdown select 'Visible (screen only)'. But when I print the form the the button was printed. How to hide the button for print and show for screen?

Thanks.

2 Replies

Avatar

Level 10

The option you set in the properties should work as expected. Not sure why the button is getting printed.

Try placing the below code in the prePrint event of the button you want to hide in printing.

     this.relevant = "-print";

Thanks

Srini