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
Lesezeichen