0
votes

Ok, we're having a problem while developing a SharePoint 2010 site containing a number of customizations. We've created a number of custom listforms on a custom list, including a new NewForm.aspx, a new EditForm.aspx and a DispForm.aspx.

I've customized these forms using SharePoint Designer 2010, adding a new DataFormWebPart to the page (leaving the original ListFormWebPart intact, but hidden) en customized the XSLT.

Now, everything works like I want it to, but I can no longer upload attachments to my listitems. Only my AllItems.aspx still has a working Attachment-button on the Ribbon, on all my customized forms it's grayed out and says: "This control is currently disabled".

Another problem, which I suspect is related: I've enabled the out-of-the-box Rating functionality on the list. The field renders fine on all my forms and I can click it, after which it shows that I've entered a rating. But, when the page is reloaded or the user leaves for another page, the Rating is not saved to the listitem.

I'm working using site collection administrator permissions, so I think we can exclude a permissions-related cause. Also, I can upload attachments using the AllItems.aspx, so the list itself is fine... Maybe I'm missing some essential JavaScript because of the DataFormWebParts?

1
I should probably note that I've found the Microsoft KB-article detailing a workaround for the same problem in SharePoint 2007, but it hasn't solved my problem in SP2010. - Loek

1 Answers

0
votes

Well, we found a way to work around the problem.

By my reasoning, the DataFormWebParts I used are the exact same mechanism I used to work with in SharePoint 2007, while both the mechanisms that now refuse to work are both new in SharePoint 2010.

So, I included a <SharePoint:AttachmentsField>-tag on my DispForm.aspx and made a custom link to the "Upload Attachment"-page in the XSLT of the DataFormWebPart on my EditForm. It's probably obsolete, but at least it works now...

This means that users can now upload an attachment and it will be shown to other users browsing the listitem, but it's (obviously) far from ideal... Also, it hasn't fixed the problem with my Rating-field, naturally...