Issue Bug Closed

#23547IRRE: Foreign selector ignores optgroups in selectboxes

Thomas Maroschik 09/16/10, 15:13 updated 03/06/14, 09:05

Description

Szenario:
I am usign a tca field of type inline with the configuration

‘type’ => ‘inline’,
’foreign_table’ => ‘tx_XXX_domain_model_example’,
’foreign_selector’ => ‘example_field’,
’MM’ => ‘tx_XXX_domain_model_example_mm’,

with foreign selector on a field example_field configured like this

‘type’ => ‘select’,
’items’ => array(
array(‘A’,’—div—’),
array(‘1’,‘A1’),
array(‘2’,‘A2’),
array(‘3’,‘A3’),
array(‘B’,’—div—’),
array(‘1’,‘B1’),
array(‘2’,‘B2’),
array(‘3’,‘B3’),
),

Problem:
t3lib_TCEforms_inline renders all items including the dividers in <option> tags.</option>

Solution:
Adopt the selectbox rendering from t3lib_TCEforms.

Attached Patch fixes the Bug.

(issue imported from #M15725)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.