Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Hide Toolbar Print Button

Avatar

Level 2
I'd like to hide the toolbar print button from the user to force the user to use the forms print button which is used to validate input. I've found this peice of code.



app.hideToolbarButton("Print");



I've added this code in the print buttons click event. But it doesn't hide the print button in the Adobe Reader or when viewed with IE.



1) Is that the right code?

2) I'd like to add this to the forms ready or layout ready events but can't seem to determine where the script can be added for these two events. Where is that done at?



If there's a better technique for validating form feilds without nagging the user everytime they tab off a field but insuring the form is validated before printing or saving I'm open to suggestions, :-).
1 Reply

Avatar

Former Community Member
This won't work in a web browser or a standalone client unless you are running a trustedFunction which resides on the local machine within a Folder Level JavaScript.



Rocky