Buy Now
Sign in

Chronoforms v6: file upload input field in dynamic Path

gmarra7 , October 09 2019, 15:38
G
gmarra7 80
October 09 2019, 15:38 #389480
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
G
gmarra7 80
October 09 2019, 19:13 #389482
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:errore.png
What am I doing wrong?
Thanks
Attachments
errore.png
errore.png
(3.51 KiB)
141 Downloads/Views