Finally, I think this is working...!
$objNews = new NewsModel();
$objFile = new FilesModel();
$objNews->singleSRC = $objFitxer->findById($arrFiles[picture][uuid])->uuid; // 'picture' is the...
Type: Posts; User: infomiquel
Finally, I think this is working...!
$objNews = new NewsModel();
$objFile = new FilesModel();
$objNews->singleSRC = $objFitxer->findById($arrFiles[picture][uuid])->uuid; // 'picture' is the...
I'm getting uuid from FilesModel class (reading table tl_files) and trying to write in singleSRC column in tl_news (using NewsModel class). But the result is different:
In tl_files, the value for...
I found it: I get the singleSRC from $arrFiles:
$arrFiles[picture][uuid]
Explanation:
$arrFiles[name_of_the_form_field][uuid]
Yes, you could use class ContentModel to read/write data from/to table tl_content. You need to usea contentModel object in your class (the class you write for using with processDataForm Hook):
...
Good morning!
I'm coding a class for using when a form is sent (using processFormData hook). In the form, some files could be uploaded (usually an image file). I configured in the backend...