Buy Now
Sign in

Multiple image field file name provider

black_angel , December 28 2017
B
black_angel
i have 8 file uplaod field in my form and im trying to rename uploaded photos by id of the field and date something like this:
image_1_20171229
image_2_20171229
but i don't know how can i access fields name in upload field.
admin
Hello black_angel,
The Upload action has a "File name provider" setting, you can use {var:upload_action_name.file.name} to get the file name, for example, you can use the following code:
{var:upload_action_name.file.name}_{date:Ymd}
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
B
black_angel
hi and thanks for the reply,
i'm aware of file name provider ,what i wanted was to use input ids + date as file name.
the only solution i came up with was to edit component itself.
admin
Hi black_angel,
What is the "input ids" ? the file field name ? you can use any static text if you want:
myfile_{var:upload_action_name.file.name}_{date:Ymd}
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!