Is it possible to add new custom editable fields to the module Personal data? If so, how does this work? PHP my admin and add Mysql tables? Or can this be done via the contao backend? Please advise
Is it possible to add new custom editable fields to the module Personal data? If so, how does this work? PHP my admin and add Mysql tables? Or can this be done via the contao backend? Please advise
hi,
you've to create a little extension to add the new fields. Take a look into the contao manual: https://contao.org/en/manual/3.2/cus...-custom-fields
Also take a look into the newsletter extension (system/modules/newsletter/dca/tl_module.php), which adds the new field "newsletters".
PHP Code:
/**
* Add palettes to tl_module
*/
$GLOBALS['TL_DCA']['tl_module']['palettes']['personalData'] = str_replace(',editable', ',editable,newsletters', $GLOBALS['TL_DCA']['tl_module']['palettes']['personalData']);
/**
* Add fields to tl_module
*/
$GLOBALS['TL_DCA']['tl_module']['fields']['newsletters'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['newsletters'],
'exclude' => true,
'inputType' => 'checkbox',
'foreignKey' => 'tl_newsletter_channel.title',
'eval' => array('multiple'=>true),
'sql' => "blob NULL"
);
Hello there,
I tried to add my custom module by following the contao guide, but when I try to add it in contao itself it is not showing up in modules, although contao/install.php recognized the new fields. Am I doing something wrong or am I missing something?
Thanks in advance.
Hi,
i think "feEditable" in the eval array is the keyword ... "feGroup" also.
Look at my [SimpleFrontendPortlets] for an example.
I also added a custom group ...
Greetings, Cliff
Extensions :: Github :: No support via PM.
Thanks for the reply! It Worked!
Is it also possible to edit already existing fields, like firstname. If so, where do i change that?
Thanks in advance
You can override module dca settings in system/config/dcaconfig.php
Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
Amazon wishlist
Bookmarks