Contao-Camp 2024
Ergebnis 1 bis 6 von 6

Thema: Member custom fields, the problem with showing title

  1. #1
    Contao-Nutzer
    Registriert seit
    01.06.2018.
    Beiträge
    104

    Standard Member custom fields, the problem with showing title

    Hi everybody,
    I succeed to make a few fields in registration form. Only, I can see the names of these new fields in Contao backend. In frontend is everything OK, I can see names of the fields, but in backend not. Anybody can give me some hint:
    PHP-Code:
    <?php

    // The palettes
    $GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace
    (
        
    'company',
        
    'companynumber,company',
        
    $GLOBALS['TL_DCA']['tl_member']['palettes']['default']
    );

    $GLOBALS['TL_DCA']['tl_member']['palettes']['default'] = str_replace
    (
        
    'company',
        
    'companybranch,company',
        
    $GLOBALS['TL_DCA']['tl_member']['palettes']['default']
    );


    // The field meta data
    $GLOBALS['TL_DCA']['tl_member']['fields']['companynumber'] = array
    (
        
    'label'                   => &$GLOBALS['TL_LANG']['tl_member']['companynumber'],
        
    'exclude'                 => true,
        
    'search'                  => true,
        
    'sorting'                 => true,
        
    'inputType'               => 'text',
        
    'eval'                    => array('feEditable' => true,'feViewable' => true,'feGroup' => 'personal','tl_class' => 'w50'),
        
    'sql'                     => "varchar(255) NOT NULL default ''"
    );

    $GLOBALS['TL_DCA']['tl_member']['fields']['companybranch'] = array
    (
        
    'label'                   => &$GLOBALS['TL_LANG']['tl_member']['companybranch'],
        
    'exclude'                 => true,
        
    'search'                  => true,
        
    'inputType'               => 'textarea',
        
    'eval'                    => array('feGroup' => 'personal','tl_class' => 'clr long''preserveTags' => true,'rows' => '10','cols' => '55','wrap' => 'soft','rte' => 'tinyMCE'),
        
    'sql'                     => "varchar(255) NOT NULL default ''"
    );


    // Lang
    $GLOBALS['TL_LANG']['tl_member']['companynumber']      = array('Company number''Company number');
    $GLOBALS['TL_LANG']['tl_member']['companybranch']      = array('Company branch''Company branch');
    This is how looks my new fields in the backend:
    reg-ss.png

    I'm using last Contao 4.9.2, and PHP 7.4

    Thank you in advance

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.028
    Partner-ID
    10107

    Standard

    Did you add a translation under contao/languages/en/tl_member.php? You are referencing $GLOBALS['TL_LANG']['tl_member']['companynumber']

  3. #3
    Contao-Nutzer
    Registriert seit
    01.06.2018.
    Beiträge
    104

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    Did you add a translation under contao/languages/en/tl_member.php? You are referencing $GLOBALS['TL_LANG']['tl_member']['companynumber']
    Yeee, that was the problem
    I had only /de translation, but I used the English language in the backend. Thank you Spooky.
    I need also Avatar for my members. Contao-Avatar pöugin have some problems with uploading. Do you have a suggestion how I can add a field for image uploading? Thanks one more time.

  4. #4
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.028
    Partner-ID
    10107

    Standard

    I think may be it's best to analyze and fix the problem in the extension. May be contract someone to do that?

    https://github.com/terminal42/contao-avatar/issues/19

  5. #5
    Contao-Nutzer
    Registriert seit
    01.06.2018.
    Beiträge
    104

    Standard

    Zitat Zitat von Spooky Beitrag anzeigen
    I think may be it's best to analyze and fix the problem in the extension. May be contract someone to do that?

    https://github.com/terminal42/contao-avatar/issues/19
    I agree,

    OK, then I'll be waiting.

    Thanks

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.028
    Partner-ID
    10107

    Standard

    I don't think anything will happen if you just wait . There is a specific sub forum for small contracting work. You could ask there (if you find your way around the German forum).

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •