Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

PDF Only?

Post Reply
FBC-Tim
Posts: 25
Joined: Thu Jun 23, 2011 6:08 am

PDF Only?

Unread post by FBC-Tim »

Is it possible to turn off the "Print to Screen" and "Email" buttons so the only options available to the user are "Print to PDF" and "Email PDF"?
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: PDF Only?

Unread post by admin »

FBC-Tim,

Try this in the Javascript section of the Form used by the report.

Code: Select all

function nuLoadThis(){

   hideButtons(document.body);

}

function hideButtons(node){

   for(var i = 0; i < node.childNodes.length; i++){
      hideButtons(node.childNodes[i]);
   }

   if(node.className == 'actionButton'){
      var bTitle = node.value;
      if(bTitle == 'Print to Screen' || bTitle == 'Email'){
         node.style.visibility  = 'hidden';
         node.style.width  = '0px';
      }
   }
}

Steven
Post Reply