0

I'm using an infopath browser enabled form in our sharepoint 2010 list. Is there a way to systematically or programmatically hide or disable certain buttons of my choosing in the ribbon bar? I would like to disable/hide the save button in edit mode and push them to the infopath forms submit buttons instead, however, I would like to let the user edit the form if it comes up in display mode. Any direction would be appreciated! Thank you!

0

You could call some javascript using this method:

http://blogs.msdn.com/b/infopath/archive/2005/06/17/430347.aspx

The script to call would be like this (edit to fit the button(s) you want to remove):

<script type="text/javascript">

    function HideDeleteOption() 
    {
        try {
document.getElementById("Ribbon.ContextualTabs.InfoPathListDisplayTab.Manage.Controls.btnDelete-Medium").style.display = "none";
        }
        catch (ex) 
        {
        }
    }

    function HideEditDeleteOption() 
    {
        try {                
  document.getElementById("Ribbon.ContextualTabs.InfoPathListTab.Actions").style.display = "none"
        }
        catch (ex) 
        {
        }
    }

    setTimeout("HideDeleteOption();", 100);
    setTimeout("HideEditDeleteOption();", 100);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.