Welcome to the nuBuilder forums!

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

How do I remove email buttons from Run Activity?

Post Reply
JohnKlassen
Posts: 148
Joined: Wed Dec 05, 2012 4:56 am

How do I remove email buttons from Run Activity?

Unread post by JohnKlassen »

Hi,

I am trying to give my users the option to print reports from the 'Run Activity' button or by using the printIt() option on a button. The user does not plan to use Email so I am trying to hide the 'Email' and the 'Email to PDF' buttons. I saw another post that has the following Java script:

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';
      }
   }
}

The post says to place this script in the Javascript section of the form used by the report. When I go to 'Add Activity' to define the report, I only see a section for PHP code. When I go to the 'Run Activity' form definition, I don't see any place for Javascript.

Please give me more detail on where to put the Javascript or if there is an alternative.

Thanks,

John
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: How do I remove email buttons from Run Activity?

Unread post by admin »

John,

Javascript needs to go on the Form the Activity uses.

Steven
Post Reply