2

Any thoughts why a Sprout Form is not saving a form submission that contains a file.

Not throwing any errors and on submission the user is returned to the form.

This is a local build - I thought it might be a permissions issue with the file upload but nothing in logs, which seem to suggest that the entry/submission is being saved (event is valid, element saved).

However, nothing is being saved in the back-end and the file is not being uploaded to the allotted directory.

Confused - any help appreciated.

  • and yes, enctype="multipart/form-data" is declared on the form element – Cole Henley May 4 '16 at 11:21
  • 1
    A few thoughts to start off with: Does the submission work when no file is added? Is the filetype an allowed file type in Craft? What size is the file? Could this be a memory-related error? Is it possible your Title Format setting (on the Forms advanced tab) has a syntax error? – Ben Parizek May 4 '16 at 14:29
  • hussah - thanks Ben. It was an issue with the filetypes set for the asset upload. Resolved now - would be useful if at all possible to log this in the plugin log but not sure what Craft returns if an incorrect filetype is upoaded. Thanks again – Cole Henley May 4 '16 at 14:45
  • Glad to hear it Cole. We'll take a look at adding better logging there. – Ben Parizek May 4 '16 at 15:07
2

For the record, the issue, as determined from the comments above was that the Asset field settings did not allow the type of file that was being uploaded.

Updating the Asset field settings to allow the uploaded file type solved the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.