1

I would like to hide a save option in newifs.aspx page of SharePoint list ribbon.

How to achieve this, I am using Infopath Form?

thanks in advance!

1

If you need to apply it for all lists add the following style to master page

In case of you need to apply it for specific list

  • Add Script Editor
  • Add the following style
   <style>
    #Ribbon\.ListForm\.Edit\.Commit\.Publish-Large

{ display:none !important;   }
    </style>

OutPut

enter image description here

see also the details steps at Hide a Save button at List Ribbon in SharePoint via CSS or JavaScript

[Update]

Regarding adding CSS or JS to InfoPath form it's not applicable , the Infopath forms are not HTML or web pages, they are XML data to be used by external tools.

Read more at Add js to an InfoPath form

  • above style is not working – sam daniel Aug 10 '16 at 16:27
  • In addition, my SharePoint list has been modified by InfoPath – sam daniel Aug 10 '16 at 16:31
  • I updated my answer – Mohamed El-Qassas MVP Aug 10 '16 at 16:37
  • M.Qassas, no luck dear – sam daniel Aug 10 '16 at 16:55
  • I am sure it will work try this <style> #Ribbon\.ListForm\.Edit\.Commit\.Publish-Large { display:none !important; } </style> – Mohamed El-Qassas MVP Aug 10 '16 at 16:57
2

add this script

var save = document.getElementById("Ribbon.ListForm.Edit.Commit.Publish-Large");
save.style.display="none";
1

Follow these steps:

  1. List item
  2. Edit New Item Page
  3. Add Script Editor Web Part
  4. Add Following Style:

    <style>a[id="Ribbon.ListForm.Edit.Commit.Publish-Large"]{display:none;}</style>
    
  5. Press Insert Button

  6. Click on Stop Editing Page
0

I just worked on something pretty similar to this. It comes down to permissions. If you want it hidden no matter who is on the page, then @M.Qassas answer would work, but it means you'd need to add that Script Editor web part on every page you want this to happen. Alternatively, you can do this in your masterpage in the section where the PublishingRibbon:PublishingRibbon is:

        <Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionString="AddAndCustomizePagess">
            <PublishingRibbon:PublishingRibbon runat="server"/> 
        </Sharepoint:SPSecurityTrimmedControl>

This makes it so only users that have the "AddAndCustomizePages" action can see the edit button (and consequently the Save button). Additionally, this hides the scary options from the Actions menu that you wouldn't want most users seeing anyway.

0

Try this and make sure the CSS is being applied on that page correctly:

<style>
#Ribbon.DocLibListForm.Edit.Commit.Publish-Large
{
     display:none !important
}
</style>
  • Its working for normal SharePoint list but not for InfoPath customized lists! – sam daniel Aug 14 '16 at 6:44

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.