Cat’s out of the bag – How to get back attachment functionality with Custom List Forms

IMPORTANT: This issue has now been resolved via an official hotfix from Microsoft. Please see Error message when you try to attach a file in a custom form on the Web site in Windows SharePoint Services 3.0: “This form was customized not working with attachment".

As posted by Marc Davis, there is an unsupported workaround for retaining attachment functionality with your custom list forms. For some time now, we've been supplying the workaround free of cost to customers who've opened support cases and requested a fix. We are okay with the Marc's posting, and to be honest something like this was bound to happen, considering our delay in posting the MSDN documentation for the issue. I am also relieved to see Marc's disclaimer in bold red. We understand your guys' frustration with the attachment problem, and I apologize we didn't post the workaround earlier. We just don't generally like providing unsupported cumbersome workarounds. Although I can't guarantee or give anything "official," I can hint that you may be seeing a real fix circa SP2 time frame. May be a ray of light at the end of the tunnel, yet.

Comments (23)

  1. Ricky says:

    Do you guys have an idea of when will SP2 be released, since SP1 came out not long ago?

  2. sakendrick says:

    I’ve lost so much time as a result of this (and now my list is broken).  Any expidited fix would be greatly appreciated and way to repair existing customized forms (or reset back to default).


  3. michmon says:

    I really can’t give a timeframe, as everything is tentative, Ricky.

    Sakendrick – In what way is your list broken beyond attachment functionality? You can always re-insert a normal List Form (ala ListFormWebPart) back on your form pages. Though, it shouldn’t be removed in the first place; read our post about preventing issues with supporting files.

  4. Jim Thomas says:

    My problem is related, but not exactly the same.  With WSS 3 I’m accustomed to being able to quickly create a List "New Item Form" page in SPD, by creating a web part page and then using the Data Source Web Part to insert the selected Fields as "New Item Form".  When I do this with our MOSS site, after detaching the page layout on the page, I get "Error Creating Control – ff4_new  Object reference not set to an instance of an object".  I deleted and recreated lists and pages with the same result.  Some of the site default lists work fine on the page, but other give the same error.  Any ideas?

  5. Michal says:

    Hi, i have problem with this workaround.

    I have custom list form with 2 fields : title and toBeHidden. when i make addform and in this form delete toBehidden field, everything is ok and works fine. But when i do this in edit form, this workaround stops work. When i have toBeHiddenfield in edit form, workaround works, when i delete toBeHidden field, workaround doesn’t work.

    I debuged SPDataSourceEx and found, that function ExecuteUpdate is not started when i delete toBeHidden field. but is not possible found why, because this function is called from external code.

    do you know solution ?

    thank for advice

  6. michmon says:

    @Michal: Why delete the field "toBeHidden" when you can simply hide it using CSS? Try wrapping the form field with something like this <span style="visibility:hidden;"> … </span> or <span style="display:none;"> … </span>. Does that resolve the issue you see on the Edit Form?

  7. Brent says:

    Any update on a (possible) time frame for SP2? This issue should have been addressed months ago.

  8. Gabriel says:

    Anyone knows why SPDataSourceEx doesn´t work in Edit Mode if the webpart is into a WebPartZone?  I need the webpart to be into a webpartzone otherwise audience doesn´t work. Any solution?

  9. michmon says:

    Gabriel: just to confirm, it doesn’t work in the web part zone. In fact, the recent infrastructure update (KB coming soon) suffers from the same problem; sorry. I’ll take your comments back to some of my peers. Certainly, not having audience targeting is a huge hit. No solutions I know of…

  10. Jim Reeves says:

    Can you tell me where the MSDN documentation for this fix is located?

  11. bob e says:

    I believe this has been resolved with a hotfix – I’m about to try it…

  12. Shereen says:

    hotfix worked for me, no need to go to the effort of following marc’s workaround.

  13. says:

    We are on MOSS 2007 – with SP2.  I have just run into the error of not being able to add an attachment to a customized NewForm.aspx.  Is there a fix for this?  I have tried to install the hotfix mentioned above, but it says that my version was "not the version expected" – assuming we are further along than what it’s looking for.  Any help would be greatly appreciated.  thanks.


  14. michmon says:

    @simplysql: If you have SP2 for MOSS installed, you will also want to get SP2 for SharePoint Designer installed. After this is finished, re-insert your Custom List Form cleanly. The SPD update includes the manual XSLT fixes automatically, so you don’t have to make any changes yourself. And the MOSS update incloudes the necessary server-side fix for this to work.

  15. grubi says:

    Not sure what happened but for me the problem is still not fixed.

    On the server side we have WSS 3.0 + SP2 + April Cumulative Update (KB 968850)

    On the client side we have SharePoint Designer 2007 + SP2.

    The code in question is still missing from the rendered pages even on newly created custom forms.

    Anything we miss or is this bug still not fiexed after such a long time?

    We tried to apply the SPD hotfix which was released for this issue (KB 960311) but it requires SPD SP1 and not SP2.

  16. HIrvine says:

    To simplysql and grubi:  I also had the same issue; SP2 installed for WSS, MOSS and Designer.  I still had the same error even with a clean new custom form. I made sure to keep the original web part in place and hid it.  Generated the new custom form code, but still got the attachment error.  Then I reread the hot fix posting a little more closely.  I had hidden the form, but not closed it.  On my test list, I closed the form and the attachment started working.  

    Closing the web part eliminated a conflict between the two web parts on the page.  

    Remember not to delete the original web part or you will have serious issues.

  17. Robert L says:

    How does this apply to Data View forms? I’m using a Data View for New Item and Edit Form and am struggling to find any way of managing attachments. Are attachments disabled in Data View?

  18. Robert L says:

    I am likely confused, having just realized that the Custom List Form is in fact a Data View. Does this mean that attachments only works on the default NewForm.aspx and EditForm.aspx pages if the List Form web part is hidden and closed and a Custom List Form inserted? Is there no way of making attachments work on a standalone aspx page created from scratch?

  19. Earl B says:

    I have SP2 on SPD. My NETOPS says the server has SP2 for Sharepoint. I design my NewForm.aspx using the code posted. I am still geting "Error Rendering Control – Unnamed3" in SPD and get "The data source control failed to execute the insert command. " when trying to upload a document.


  20. quincyt says:

    @Earl B

    Same here! I’m starting too lose all my hair on this one… and it wasn’t much already!!!

    Does anyone please has a solution ?!? Many thanks in advance.

  21. mek says:

    I installed KB960311 hot fix, attachments works fine in my customized EditForm.aspx, the problem is that after I choose the file to be attached and press OK button, it doesn’t go back to Edit View. But if i press cancel, you can see that the attachment is saved.

    any suggestions?

  22. Michael says:

    Bob e posted the link to, but there’s much more than just the hotfix involved with this.

    I’ve struggled with this bug for months, and that KB article finally listed everything needed to get it to work. I also upgraded my Designed to SP2, which I heard was also necessary. I’m so glad to have this working now.

  23. Nicky says:

    I am in a similar situation as grubi – we have WSS 3.0 SP2 installed and I'm using SPD 2007 SP2.

    When I try and use the attachment functionality in a custom edit form, I get an 'Object Required' JavaScript error and have to cancel out of the form.

    I have the original list form hidden and closed on the page.

    Please help – I've tried several workarounds but just can't get the upload attachment form to work as expected.



Skip to main content