Developer forum

Forum » CMS - Standard features » RE: Form for editors dynamic upload path

RE: Form for editors dynamic upload path

Jan Sangill
Reply

Hi,

We want to achieve a dynamic upload path in forms for editors.

What need to happen is everytime a new form is submitted, a new folder should be created with the uploaded files.

Is this possible? Keep in mind it is not a custom solution.

A possible workaround could be a scheduled task in the background doing this for me, but if I can avoid that - it would be perfect.

Any help is appreciated!

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Jan

You can post the desired location in a hidden field called "FormUploadPath"

By default form uploads are uploadet to System\FormUploads\{formname}\

By inserting a hidden field like this:
<input type="hidden" name="FormUploadPath" value="System/Yourfolder/Whatever/">
(you can also insert a hidden field in the forms module and give it the default value of "System/Yourfolder/Whatever/")

Will save all the uploaded files to /Files/System/Yourfolder/Whatever/

If you have 2 file fields, you cannot not upload to different folders.

BR Nicolai

 

You must be logged in to post in the forum