You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The save action on forms comes with the options fileprefix and dateformat, which will be concatenated with a dash and used to create a directory within user/data. The form contents will then be saved in this directory in a file of the same name (plus extension). This is fantastic.
When there are file uploads in a form, the file field gives us the destination option, which is limited to self@ (the directory of the page the form is on), page@:<path>, theme@:<path> or <path>, which all let us navigate to a set (known) directory. This is nice, but does not cover a case that I thought was pretty obvious:
There seems to be no way to have the uploaded files be placed in the same directory as the form file itself. This would be very helpful however, as it enables us to have one directory per sent form, where all the form data (both the information as well as the uploaded files) can later be found.
Hence, I'm kindly asking for an additional option that will enable us to do this. My suggestion would be to add another possible value for destination, let's say save@ (someone can probably come up with a better name). Or maybe a new option altogether, like save-with-form: true|false.
Is this possible? Maybe there is a another (better) way to achieve the same?
The text was updated successfully, but these errors were encountered:
@mahagr Maybe you can share your idea? With a rough outline given, I might be able to wrap my head around the relevant code and implement a possible solution.
The
save
action on forms comes with the optionsfileprefix
anddateformat
, which will be concatenated with a dash and used to create a directory withinuser/data
. The form contents will then be saved in this directory in a file of the same name (plus extension). This is fantastic.When there are file uploads in a form, the file field gives us the
destination
option, which is limited toself@
(the directory of the page the form is on),page@:<path>
,theme@:<path>
or<path>
, which all let us navigate to a set (known) directory. This is nice, but does not cover a case that I thought was pretty obvious:There seems to be no way to have the uploaded files be placed in the same directory as the form file itself. This would be very helpful however, as it enables us to have one directory per sent form, where all the form data (both the information as well as the uploaded files) can later be found.
Hence, I'm kindly asking for an additional option that will enable us to do this. My suggestion would be to add another possible value for
destination
, let's saysave@
(someone can probably come up with a better name). Or maybe a new option altogether, likesave-with-form: true|false
.Is this possible? Maybe there is a another (better) way to achieve the same?
The text was updated successfully, but these errors were encountered: