How do I remove email buttons from Run Activity?

How do I remove email buttons from Run Activity?

Postby JohnKlassen » Sun Feb 03, 2013 3:44 am

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
JohnKlassen
 
Posts: 148
Joined: Wed Dec 05, 2012 1:26 pm

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

Postby admin » Mon Feb 04, 2013 12:32 pm

John,

Javascript needs to go on the Form the Activity uses.

Steven
admin
Site Admin
 
Posts: 3077
Joined: Mon Jun 15, 2009 9:53 am


Return to Report Writer