Ludovic Chungue

Hi all !

I guess this has been asked several times already, but I can't seem to find the answer anywhere...
Has anyone eventually found out how to create Custom List Forms with Attachments supported

As a reference, this article was quite interesting. Evi Vanoost claimed to have found the solution, but currently as it is, it seems to be incomplete...

I've continued working on this, and after adding missing tag ID="idAttachmentsRow{$noop}" and some hide-if-no-attachment Javascript, the form looks exactly like the original one. However whenever I click on OK, SharePoint does create the item, but doesn't attach the file...

Further on, I've looked in tag __designer:bind= which can also be found for both "Title" and "Body" (I'm working on a Announcement list...) ; but all my attempts lead me to :
"The data source control failed to execute the insert command."

Has anyone got a clue what's left to do



Re: SharePoint - General Question and Answers and Discussion Custom List Forms & Attachments

Niranchana

Evi solution works with one simple addition. You need to add a span tag to the attachments template.

Highlighted the same

<xsl:template name="attachments">
<xslStick out tonguearam name="Pos" />
<tr><td>
<SharePoint:AttachmentUpload ControlMode="new" runat="server" ID="fileupload{$Pos}">
</SharePoint:AttachmentUpload>
<SharePoint:AttachmentsField ControlMode="new" FieldName="Attachments" runat="server" Visible="true">
</SharePoint:AttachmentsField>
<span id="idAttachmentsRow{$noop}"></span>
</td></tr>
</xsl:template>
Rest are all same. It works for me. Good luck.

-Niranchana





Re: SharePoint - General Question and Answers and Discussion Custom List Forms & Attachments

Niranchana

EVI solution is posted in http://www.valerieandevi.be/ - SharePoint 2007, custom list forms and attachments