-
[SOLVED] Insert picture
Hi,
I'm new on Contao.
I just create a new Module, in this module I have some text fields and one Filetree field.
i want to make frontend users can post elements in my table, so I use formular generator. All is working for every fields except for picture. My form is uploading picture in library, but not set "link" in database.
Also, when I click on submit, my form create 2 element in my table and I don't know why...
Here is my field in DCA :
Code:
'image' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_mytable']['image'],
'exclude' => true,
'inputType' => 'fileTree',
'eval' => array('filesOnly'=>true, 'extensions'=>Config::get('validImageTypes'), 'fieldType'=>'radio', 'mandatory'=>false),
'sql' => "binary(16) NULL"
)
Thanks in advance for your responses and sorry for my poor english :rolleyes:
-
The form generator only stores the file path of the uploaded file in the database. However, you can use [store_uuid] to make all forms store the UUID instead (if appropriate).
-
It works, great thanks, you saved my day !!