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.

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