Article ID: 2590041 - View products that this article applies to.
When a custom display form is generated by SharePoint Designer the attachment will not be exposed if one is present. Please refer to the following link for additional information in regards to custom list forms:
The out of the box ListFormWebPart does not exhibit this behavior.
To workaround this issue users can create a code snippet and insert the markup as needed via the code view.
Alternatively, users can just paste the markup that is use to create code snippets into the custom list form.
The following markup can be used to create the code snippet:
To create a code snippet in SharePoint Designer 2010 do the following:
1. Click the File menu inside of SPD 2010.
2. Then click Options and under the general tab pick Page Editor Options.
3. Switch to the Code Snippets tab.
4. Click the Add button and give it a name like attachmentFix.
5. Provide a description to help given context to the code snippet.
6. Paste the following markup to automate the task of adding in the attachment functionality for display forms.
7. Click OK and then OK.
8. Now, when working with a custom list form and it requires the above markup perform the following in code view: Control + Enter.
9. This will bring up the built in code snippets and the one created. Pick attachmentFix and all the markup will be inserted.
This can be further automated through a group policy or other delivery mechanisms. For example, Windows 7 uses the following path to store custom code snippets:
The following document explains the code snippet's internals:
The file SnippetsCustom.xml contains the following after performing the steps above:
The Edit and New Forms don't have this issue depending on your patch level and product version.
1. After installing Service Pack 2 for SharePoint Designer 2007 and WSS 3.0 the attachment functionality will work correctly for Edit and New Forms going forward. Old forms will need to be supplemented with the new functionality.
2. SharePoint Designer 2010 and SharePoint Foundation work correctly with Edit and New forms out of the box.
3. SharePoint Designer 2007 and SharePoint Designer 2010 experience the issue with Display forms.
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.