1

I have looked through this article but don't see a solution to my specific issue.

Is it possible to remove the Save button at the top of the "new item" form just for one list (but not for the other lists on the same site)?

Alternatively, hiding the entire "Edit" tab for that list would be OK also.

save button

2
  • Hiding it from the DOM wouldn't secure the list item if that's what you are getting at, adjust permissions accordingly so they don't have Contribute rights on the list. Commented Aug 26, 2014 at 20:43
  • Thanks but I'm not trying to secure the list item. I was asked to hide the ribbon's Save button because in a specific instance it is confusing users. They will use the button at the bottom of the form to submit instead.
    – LFurness
    Commented Aug 26, 2014 at 21:20

3 Answers 3

3

If you're a bit of a perfectionist as I am, and after a "right" way of doing things, and don't particularly like js/css hacks, then you might want to consider the custom action approach:

<CustomAction
 Id="RemoveRibbonButton"
 RegistrationType="List"
 RegistrationId="{GUID-OF-YOUR-LIST-HERE}"
 Location="CommandUI.Ribbon.NewForm"
>
  <CommandUIExtension>
    <CommandUIDefinitions>
     <CommandUIDefinition Location="Ribbon.ListForm.Edit.Commit.Publish" />
    </CommandUIDefinitions>
  </CommandUIExtension>
</CustomAction>

This will effectively and completely remove the Save button from the New form of your list.

To remove it both from New and Edit form, use Location="CommandUI.Ribbon" instead of Location="CommandUI.Ribbon.NewForm".

To remove the whole tab, change CommandUIDefinition location like this (not tested, but should work):

<CommandUIDefinition Location="Ribbon.ListForm.Edit" />
1
  • +1 for perfectionism and great solution Commented Aug 27, 2014 at 5:56
1

You will want to modify the NewForm.aspx page as Colbs described in his answer, although the use of JavaScript is not strictly necessary.

The "Commit" section's container in the Edit ribbon should have a unique ID assigned to it, which you can find by inspecting the page source. Once you've found the ID, you can set it's CSS Display property to "none" by adding the following to the NewForm.aspx page (where [containerID] refers to the "ID" property of the commit section's container):

<style>
#[containerID] { display:none }
</style>
0

In SharePoint Designer, navigate to the NewForm.aspx file under your specified list. Edit this in advanced mode and within the 'PlaceHolderAdditionalPageHead' place this script (Ensure jQuery is being referenced in the MasterPage being used):

<script>
    $( document ).ready(function() {
        $( "a:contains('Save')" ).css( "visibility", "hidden" );
    });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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