0

I am trying to hide the "Customize Form" button on the List ribbon:

Current Ribbon Settings

I have created a feature that deploys an Elements.xml file that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <HideCustomAction
    Id="HideInfoPathButton"
    Location="CommandUI.Ribbon.List.CustomizeList.EditDefaultForms">
  </HideCustomAction>
</Elements>

But when I look at the ribbon, I get this:

First try

I have also tried this xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
      Id="RemoveRibbonButton"
      Location="CommandUI.Ribbon"
      RegistrationId="101"
      RegistrationType="List">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
            Location="Ribbon.List.CustomizeList.EditDefaultForms" />
      </CommandUIDefinitions>
    </CommandUIExtension>
  </CustomAction>
</Elements>

with the same results.

I have also tried different Ribbon Control Identifiers for the Location attribute, but no matter what Identifier I use, the Form Web Parts button disappears.

I have used all three of the identifiers listed at msdn for the Ribbon.List.CustomizeList group:

Ribbon.Library.CustomizeLibrary.AddButton
Ribbon.Library.CustomizeLibrary.EditList
Ribbon.Library.CustomizeLibrary.EditDefaultForms

1 Answer 1

2

Worked CAML (tested):

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
  Id="RemoveRibbonButton"
  Location="CommandUI.Ribbon"
  RegistrationId="0x"
  RegistrationType="ContentType">
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition
        Location="Ribbon.List.CustomizeList.Controls.btnCustomizeList2" />
  </CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
 </Elements>
1
  • can you post your code please . I have the same scenario but i want to hide only for a particular list Jul 17, 2014 at 14:42

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.