我希望根据前一个字段的值更改tca字段配置类型。
例如,如下所示有两个字段field_one和field_two。
'field_one' => array(
'exclude' => 0,
'label' => 'field1',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_ext_domain_model_field',
'default' => 1,
'minitems' => 0,
'maxitems' => 1,
),
),
'field_two' => array(
'exclude' => 0,
'label' => 'field two',
'config' => array(
'type' => 'input',
'eval' => 'trim'
),
),
这里我需要的是,如果 field_one 的值为 2,我需要为 field_two 加载不同的完整配置数组。
我们如何实现这一点?