Form Attachments Lost After Validation Postback
I have a problem in SharePoint 2007 (Enterprise) whereby the attachment gets lost during validation postback on a SharePoint form. My SharePoint form has a required field on it. As you know, SharePoint adds on a field validator to required fields on the NewForm.aspx. Well, let's say the user adds an attachment, but forgets to enter the required field. When the form is submitted, the validation occurs, the page is posted back with the error message, and VOILA - the attachment is no longer there. Microsoft just didn't want to put this into the viewstate for a reason? Or am I missing something? Anyhow, the behavior I want is this: 1) User attaches something 2) User forgets to enter in a required field 3) Validation occurs 4) Page is posted back with required field prompt 5) ATTACHMENT IS STILL THERE! Is there a way to do this somehow?
August 21st, 2008 9:57pm
I wanted to add that this form was not modified using SharePoint Designer - its completely out of the box. It is an unmodified form posting to a SharePoint list.
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2008 10:33pm
I have this same problem. Has anyone found a solution or workaround?My list is out of the box with zero customizations. I have a number field that must be within a specific range. If I have an attachment, and enter a number outside that number range, the webpage returns a validation error on submission (as it is supposed to) but I lose the attachment.Please advise. Thanks in advance! Enterprise Portal Administrator
September 3rd, 2008 4:27pm
Hi,I have a similar issue but I have customised my form in SharePoint Designer.I am using drop down fields in my list and there is a bug when using these in a custom form where the out of the box validation doesn't work on drop down fields.Where my issue is the same ...I have added validation using SPD to 4 form fields (2 text boxes and 2 drop downs), and on testing I have found that if I enter data intotwo of the validated fields and submit the form, the validation error kicks in. So I complete the data in the two errored fields and submit for a second time.The data from the first two fields does not get posted to the list item/record, but the second two do. This is the same for any number of validatedfields that are populated in the first submit attempt (whilst leaving at least one validated field empty).Sounds like a bug as I cannot see a problem with the way I have implemented the validation.Pete.
Free Windows Admin Tool Kit Click here and download it now
September 9th, 2009 5:55pm
We too are losing attachments if a required field is missing...attachment 'stick's and passes through to item as long as no redisplay due to missing required field....Seems to still be an issue and no proposed solutions....Any resolution ?
November 18th, 2009 9:06pm
I just ran into this issue today. I can't believe it took this long for a user to point this out to me. Has anyone figured out a workaround for this BUG? Another question is ... has this been fixed in 2010? Can it be another reason to get behind the push to upgrade to SP 2010?Thanks in advanced for any response.Tom
Free Windows Admin Tool Kit Click here and download it now
March 1st, 2010 11:12pm
We just ran into this issue as well - It's strange that Microsoft has not addressed this issue yet. Did anybody find a workaround or even hotfix for this?
Thanks,
Tom.
May 14th, 2010 1:42am