Question

When opening/editing a list item, the default ribbons (delete, version history, etc) appear at the top. However when I customize the EditForm.aspx and replace the default webpart with custom content, these ribbons suddenly disappear. Any ideas how to ensure that the ribbons stay there?

Thanks

Was it helpful?

Solution

I have done some playing around with this, and i think that the edit form web part is the thing that is actually creating the ribbon. If you close or delete it, then the ribbon does not display.

Also if you try to do the same on the NewItem page you get this message:

You are about to permanently delete this Web Part. Deleting this Web Part will render this form unusable. You will not be able to re-insert this Web Part using the browser. Are you sure you want to do this?

And then this when you try to create items

Unable to find the default new form for list Test.

UPDATE

If you have a look at:

Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnPreRender()

You will see the code that displays the ribbon. This is the edit form web part. I guess you could copy it in your custom web part to make the ribbon display.

OTHER TIPS

It sounds as though you broke something in the page that is needed for the ribbon, e.g. JavaScript reference or a control. Not a very helpful answer, I know! Not much more we can suggest with the information given.

I would go back to the original EditForm.aspx and make simple incremental changes until either you get what you want or the ribbon dissapears, at which point you will know what broke it. These pages have a lot of interconnected parts and are quite fragile if you start editing them.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top