Forums

CF and CCF issue with file field editing

kraadde 14 Jun, 2016
I created a form to enter several fields and one file field using to upload a file selected by the user and to store the file name in the db.
In order to be able to edit the data, I use CCF to select the right record and a separate edit-form which I managed to populate with all data from the db.
This works OK but only the file field will not be populated. This is a major problem, since the empty field will "delete" the database file field as soon as submitted.
Is there a workaround or a way to populate also the file filed with the "old" value?
Thanks for your help.
kraadde 15 Jun, 2016
Thanks.
Yes, but the FAQ refers to images and image files, while I just want to display and edit a doc of pdf file name and if needed upload the new file to the /upload path. How to adapt the item2. code and where to add it? I guess in a Custom Code element in the Design tab and the last code lines in a Custom Code element in the Setup tab.
Thanks for help.
Adriano
GreyHead 16 Jun, 2016
Hi Adriano,

It will be the same method except that I guess you will display a link or a description of the existing file instead of showing the image.

Bob
This topic is locked and no more replies can be posted.