File Upload

How to prevent file deletion when editing a ChronoForms form without re-uploading.

Overview

The issue occurs because the database save action treats an empty file upload field as a request to remove the existing file.
To preserve the existing file, modify the form's save action to check for an empty upload field and retain the previously stored file data instead of clearing it.

Answered
bc bcouvin 28 Jan, 2016
Hello,

I have my CFv5 with different text field including upload file field.
This one works fine.

My problem is that if I wanted to change some fields in my CFv5 without specifying the new file to upload (which is already existed in the database), the dbsave considers that my file has to be removed, as this field is empty.

I would like to kown how to unchange the existing file.

Thanks a lot.
Bertrand
bc bcouvin 29 Jan, 2016
Hello Bob,

This works fine!

Thank you.
Bertrand
This topic is locked and no more replies can be posted.