SharePoint Designer Support Team Blog

Providing insight on hot and common issues, supportability, and how-to's for Microsoft SharePoint Designer. Coming direct from the support engineers themselves. Read who we are.

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.

Published Tuesday, April 29, 2008 5:19 PM by michmon

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Ricky said:

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

May 5, 2008 9:32 AM
 

sakendrick said:

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).

thanks

May 8, 2008 8:50 PM
 

michmon said:

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.

May 8, 2008 11:10 PM
 

Jim Thomas said:

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?

June 20, 2008 5:07 PM
 

Michal said:

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

June 24, 2008 7:43 AM
 

michmon said:

@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?

June 25, 2008 10:00 AM
 

Brent said:

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

July 10, 2008 11:58 AM
 

Gabriel said:

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?

July 31, 2008 8:44 AM
 

michmon said:

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...

July 31, 2008 10:53 AM
 

Jim Reeves said:

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

August 30, 2008 9:16 AM
 

bob e said:

I believe this has been resolved with a hotfix - I'm about to try it...

http://support.microsoft.com/kb/953271

October 8, 2008 5:04 PM
 

Shereen said:

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

November 4, 2008 12:16 PM
 

simplysql said:

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.

Nick

May 21, 2009 11:36 AM
 

michmon said:

@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.

May 21, 2009 12:35 PM
 

grubi said:

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.

May 23, 2009 10:15 AM
 

HIrvine said:

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.

June 4, 2009 11:21 AM
 

Robert L said:

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?

July 19, 2009 6:21 PM
 

Robert L said:

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?

July 19, 2009 7:03 PM
 

Earl B said:

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.

Suggestions?

July 28, 2009 1:47 PM
 

quincyt said:

@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.

September 7, 2009 7:51 AM
 

mek said:

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?

November 17, 2009 6:34 AM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker