Form Attachments Lost After Validation Postback RRS feed

  • 질문

  • 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

    Is there a way to do this somehow?
    2008년 8월 21일 목요일 오후 6:57

모든 응답

  • 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.
    2008년 8월 21일 목요일 오후 7:33
  • 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
    2008년 9월 3일 수요일 오후 1:27
  • 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 into two 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 validated fields 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.

    2009년 9월 9일 수요일 오후 2:55
  • 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 ?
    2009년 11월 18일 수요일 오후 6:06
  • 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.

    2010년 3월 1일 월요일 오후 8:12
  • 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?


    2010년 5월 13일 목요일 오후 10:42
  • Sorry to awake an old thread but it would seem this still hasn't been fixed or am i missing something? I badly need a solution to this problem.


    We are using SharePoint Server 2010 Enterprise and it is not working OOTB.




    2011년 11월 28일 월요일 오후 2:21
  • Our users face a similar issue in our 2007 environment. It looks like a simple issue behind a complex method. Michael Greene details his findings here, on how SharePoint List attachments work.
    2011년 12월 5일 월요일 오후 8:58
  • It's 2019...

    I'm posting here that this issue is still persisting till now in 2019 on SharePoint 2013.

    No luck to find workarounds.


    2019년 4월 17일 수요일 오후 8:59
  • Still have the same issue in SharePoint Enterprise 2016.
    2019년 9월 26일 목요일 오후 4:37