Forums

Multiple image field file name provider

black_angel 28 Dec, 2017
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.
Max_admin 08 Feb, 2018
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
black_angel 08 Feb, 2018
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.
Max_admin 11 Feb, 2018
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, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.