Scenario:
1. Multi-step form with at least 2 pages
2. Save as draft turned on
3. File (or Multiple File) input on sub-page (not on the first page)
Outcome:
After a file is uploaded, when the form is saved as a draft or proceeded to next page (or preview page) the existing submission is duplicated, and the user is now working on the duplicated submission. When the form is submitted, the duplicated submission is saved/submitted. The original submission is left as a draft. When the user views the form again, there is a notification indicating the previous submission, as well as another notification ("A partially-completed form was found. Please complete the remaining portions.") indicating that there is an unfinished copy of the form, please complete all values, yadda yadda. But when the user tries to re-enter values into the previous submission that is still a draft, nothing can be saved to it. The original draft submission must be manually deleted.
I don't know if any of this made sense, but I can easily replicate it on a demo form. I can attach screen shots if needed. Just wondering if anyone else has experienced, or can replicate this behaviour.
Comments
Comment #2
thisisnotrealpeople commentedComment #3
danchadwick commentedReproduced. Multiple-file is a red herring. The problem exists with webform core itself.
I strongly suspect that this is caused by the core bug with file fields where the ajax call from the Upload button generates a new form build id. If this case, there may not be much we can do about it except hide the upload button with CSS. We currently have this issue with more than one file component on the same page.
Someone needs to confirm the above hypothesis.
Comment #4
danchadwick commentedAdding the related issue, but in this case I don't think it is causing this problem.
When the ajax call for the UPLOAD or REMOVE button comes in, the $form_state['values']['details'] is missing. Therefore webform ends up creating yet another draft. The solution is to save the details in storage.
Committed to 7.x-4.x.
Comment #6
danchadwick commentedPort to D8 needed.
Comment #8
fenstratCommitted and pushed to 8.x-4.x.