Forums

Chronoforms v6: file upload input field in dynamic Path

gmarra7 09 Oct, 2019
Good evening,
I need to insert in the action track to upload files
the names of two fields so as to then create a folder in which to insert the images from the compilation.

I found solutions on the forum through custom codes but with chronoforms 6 they don't seem to work:
$path = JPATH_SITE.'/images/phocagallery/'.$form->data['title'];
$mode='755';
JFolder::create($path, $mode);
$form->actions_config[1]['Upload_path'] = $path;?>

or
actions_config[1]['upload_path'] = JPATH_SITE.'/components/com_chronoforms5/chronoforms/uploads/'.$form->form['Form']['title'].'/'.$form->data['text4'].'/';?>

I also tried to adapt them by entering $form->data with $this->data
I would be grateful to those who could help me,
Thanks
gmarra7 09 Oct, 2019
I tried to use this code
<?php
$this->set("upload15", "path", "JOOMLA_PATH".DS."images".DS."partner".DS.$this->get('settore_attivita').DS);
?>
but this is the error that returns me:

What am I doing wrong?
Thanks
teldrive 19 Jun, 2021
this worked to me
{path:root}/images/
This topic is locked and no more replies can be posted.