NOTE: I know this question has been asked before but the answers shown at Buttons not appearing in custom ribbon group do not seem to explain fully how to solve the issue. I added a GroupTemplate but have no idea where to add the Scaling element. So i will ask the question again and hopefully will get help:
I am trying to put a custom Group + button onto the ribbon of the NewForm.aspx for only lists derived from a custom list definition. The following is what i have come up with. The problem is that although the group appears where you would expect on the ribbon the button is missing. Can anyone help me figure out what i'm doing wrong?
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="SelectPictureButton"
RegistrationType="List"
RegistrationId="10001"
Location="CommandUI.Ribbon.NewForm"
Sequence="0"
Rights="">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Templates._children">
<GroupTemplate Id="Ribbon.Templates.CustomTemplate">
<Layout Title="Large">
<OverflowSection Type="OneRow" TemplateAlias="o1" DisplayMode="Large"/>
</Layout>
<Layout Title="Medium">
<OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Medium"/>
</Layout>
<Layout Title="MediumTwoRow">
<OverflowSection Type="TwoRow" TemplateAlias="o1" DisplayMode="Medium" />
</Layout>
<Layout Title="Small">
<OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Small" />
</Layout>
<Layout Title="Popup" LayoutTitle="Large" />
</GroupTemplate>
</CommandUIDefinition>
<CommandUIDefinition Location="Ribbon.ListForm.Edit.Groups._children">
<Group Id="Ribbon.ListForm.Edit.Groups.CustomGroup"
Sequence="100" Title="Actions"
Description="Custom Action Group"
Template="Ribbon.Templates.CustomTemplate">
<Controls Id="Ribbon.ListForm.Edit.Groups.CustomGroup.Controls">
<Button
Id="Ribbon.ListForm.Edit.Groups.CustomGroup.Controls.Button"
Alt="Select Image"
Sequence="1"
Image32by32="/_layouts/images/PicturePicker/image_32.png"
Command="SelectImageCommand"
LabelText="Select Image"
TemplateAlias="o1"
CommandType="General"/>
</Controls>
</Group>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="SelectImageCommand"
CommandAction="javascript:alert('Hello World');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
</Elements>