6

I developed in VS 2010 a custom list form and I want to use the "standard" Sharepoint Ribbon, ie, the same Ribbon used in all list forms withe the same buttons.

It's possible do this?

Any help will be appreciated.

2 Answers 2

2

Yes it is possible. In my case the was a visual studio solution that contained a list with custom forms.

    <Forms>
      <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\CustomDisplayForm.aspx" WebPartZoneID="Main" />
      <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\CustomEditForm.aspx" WebPartZoneID="Main"/>
      <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\CustomNewForm.aspx" WebPartZoneID="Main"/>
    </Forms>
  </MetaData>
</List>

And the pages referenced all are inherited from WebPartPage. The solution put these pages into {SharePointRoot}\Template\Pages.

Please let me know if you haven't got the idea and need more details.

9
  • It was one of my first trials. When I try to open a created item (my custom form is a display form), the form is open with no ribbon.
    – cpinheiro
    Commented Mar 2, 2012 at 13:47
  • 1) Ensure that your page inherits from a webpart page Commented Mar 2, 2012 at 20:44
  • 2) Make sure that there is actually a listformwebpart on the page Commented Mar 2, 2012 at 20:44
  • 3) hide the listforwebpart on prerender. This solution is quite dirty but when you realize how it all works you will be able to come to the idea how to make it more clear. Like my team and me did :) I wish you good luck Commented Mar 2, 2012 at 20:46
  • Thank you for your help. It works ;o)
    – cpinheiro
    Commented Mar 4, 2012 at 19:32
0

I have an idea for this task - you can implement your custom form UI as a webpart and add it to a standard list item form. Then you need to hide (but not delete) a standart data form on that page. The idea behind it is to let the dataform webpart do the work for you - on a standard page it requests the needed tabs from the ribbon.. I've realized that it doesn't work because in this case you will not be able to control item save button - it will be rendered by DataFormwebPart. :(

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.