Fix for the Custom Form Attachments Issue

In my first blog post called Displaying SharePoint Fields by Permission level, I made a side note that said

Also, I’d like to note that when using custom forms like this, the Attachment button doesn’t work anymore.  I think there are blogs somewhere about this bug, but I’ve never tried fixing it.

Well, Microsoft finally has a fix for this.  So, apparently, as long as you do have the infrastructure update installed on your servers, and your SharePoint Designer is at SP1 level, you can install the following fix:

The following is the email directly from Microsoft about where to get the fix, and how to apply it:

This is the client side fix:

The server side fix you already have installed but that is the WSS 3.0 Infrastructure Update.

Download this and update your SPD. This will place the code needed to make attachment functionality work for new and edit forms.

For Display forms only, you need to add this:

  1. Open SharePoint Designer 2007. Go to File | Open Site and connect to SharePoint site.
  2. Expand out Lists -> [List Name] -> open DispForm.aspx .
  3. Highlight normal list form by clicking on it. This will select the entire web part.
  4. Right-click on selected web part, and choose Web Part Properties…
  5. Expand [+] Layout, check option for Hidden, click OK.
  6. With web part still highlighted, hit the right-arrow key once. Hit Enter. This creates some whitespace to insert.
  7. Go to File | Insert SharePoint Controls | Custom List Form…
  8. Select appropriate list or library, content type, and type of form to create. Click OK.
  9. Put cursor in the “Expires” table cell, right-click | Insert | Row below. There should now be a new table row with two column cells.
  10. Put cursor in the left table cell of the new row, type “Attachments”.
  11. Put cursor in the right table cell of the new row, go to Code view, and paste the following code:
    <SharePoint:AttachmentsField ControlMode=”Display” FieldName=”Attachments” runat=”server” Visible=”true”/>
  12. Save page.

In summary, in SharePoint Designer, when you insert a custom form (DVWP) to create your own custom EditForm.aspx, DispForm.aspx, and NewForm.aspx, the attachment functionality won’t break anymore.

Technorati Tags:


  • Laura, I have really enjoyed your postings! Keep up the good work. You are hitting on a lot of the nuanced power of SharePoint and blog in a very direct style that is easy and enjoyable to read. Lee


  • Thanks a lot for this – very helpful. For some reason, when I select Web Part Properties instead of showing the properties it shows a preview of the dispform.aspx page in a narrow window (the size of the window the properties should be in). This is strange behavior and I have no explanation for it. It might be unique to our environment. The work around I found is to go to the code and look for tag. Change its value to false and it will hide the web part.


  • Laura – this is exactly what I need, but when I try to apply the Hotfix for Office (KB960311) I get a dialog popup that reads “The expected version of the product was not found on the system.” I have checked and I do have SPD installed with SP1 applied. I have also stepped through your process and attachments are not displaying so I am assuming that this hotfix somehow needs to get applied, but I am running into a brick wall. Any insights as to what the problem could be? Thanks!


  • Great post, thanks very much. Having the same problem as Jill, “The expected version of the product was not found on the system.” SPD SP2.


  • Hi, Great Post! Could you plz suggest as to how to rectify this issue in Newform.aspx and Editform.aspx


  • Shubham, The same method works for all forms, from what I rememeber, but if you simply install the latest SharePoint 2007 service pack on both your server and SPD service pack on your client machine, this bug is fixed.


  • You, my friend, are a God send. Thank you!


  • Is there a fix that does not require SPD? I have created a form in InfoPath 2010 and published it to SP 2010. I have a drop down that unhides different sections depending on the selection. If the user tries to attach a file before selecting something in the drop down, the attachment control works. But if they select an item from the drop down, the attachment control stops working. I am not sure why the hiding/unhiding of other sections affects the attachment control. Any thoughts? The attachment selection is not in any of the sections that are hidden.


  • Marie,
    This was a bug way back in SharePoint 2007, and Microsoft fixed it with a service pack.


Leave a reply or question

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.