Results 1 to 7 of 7

Thread: Custom editable fields to the module personal data

  1. #1
    New user
    Join Date
    03-03-14.
    Posts
    9

    Default Custom editable fields to the module personal data

    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

  2. #2
    New user
    Join Date
    01-07-14.
    Posts
    5

    Default

    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"
    ); 

  3. #3
    New user
    Join Date
    03-03-14.
    Posts
    9

    Default

    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.

  4. #4
    New user cliffen's Avatar
    Join Date
    10-18-13.
    Location
    Lüneburg
    Posts
    22

    Default

    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.

  5. #5
    New user
    Join Date
    03-03-14.
    Posts
    9

    Default

    Thanks for the reply! It Worked!

  6. #6
    New user
    Join Date
    03-03-14.
    Posts
    9

    Default

    Is it also possible to edit already existing fields, like firstname. If so, where do i change that?

    Thanks in advance

  7. #7
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    495

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •