Home > CRM > Hide Buttons on CRM Forms

Hide Buttons on CRM Forms

Need to hide the Actions and the save button on some forms.

I needed to find the id of the <li> tags for each button:

Save: _MBcrmFormSave’

Action Button: action

 

Once I had that, I added the following code to the forms onLoad() event:

/*******************************************************************/
//HIDES THE BUTTON BASED ON THE NAME OF IT ‘ID’ OF THE <LI> TAG
var Hide = function(menuItem)
{
    if (document.getElementById(menuItem) != null)
    {
        document.getElementById(menuItem).style.display = "none";
    }
}
/*******************************************************************/
//REMOVES THE SPACE AFTER THE BUTTON BASED ON THE NAME OF IT ‘ID’ OF THE <LI> TAG
var RemoveSpacerAfter = function(menuItem)
{
    if (document.getElementById(menuItem) != null)
    {
        var item = document.getElementById(menuItem);
        if (item.nextSibling != null)
        {
            item.nextSibling.style.display="none";
        }
    }
}
/*******************************************************************/

Hide(‘_MBcrmFormSave’);
RemoveSpacerAfter(‘_MBcrmFormSave’);
Hide(‘action’);
RemoveSpacerAfter(‘action’);

 

done.

Categories: CRM
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: