Page 1 of 1

How do I remove email buttons from Run Activity?

Posted: Sat Feb 02, 2013 7:14 pm
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

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

Posted: Mon Feb 04, 2013 4:02 am
by admin
John,

Javascript needs to go on the Form the Activity uses.

Steven