[TYPO3-dev] Change TCA eval based on type?
Neil Bertram
neil at tasmanstudios.co.nz
Mon Oct 23 09:13:29 CEST 2006
Hi,
Is there currently a way to override TCA "columns" entries based on the
"types"? I would specifically like to set the eval field...
What I have is a table with lots of fields, and also many "types" based
on a select. Depending on the type selected, I would like certain fields
to become mandatory and others optional. I can't find a way to do this
currently...
If this is a feature that doesn't exist, I'm happy to work on a core
patch to allow an overlay of columns from within types, eg:
$TCA['footable'] = array(
...
'columns' => array(
'colname' => array(
'label' => 'foo',
'config' => array(
'type' => 'input',
'size' => '20'
)
)
)
'types' => array('0' => array(
'showitem' => 'colname',
'columnoverlay' => array(
'config' => array(
'size' => '50',
'eval' => 'required'
)
)
)
)
Does this sound generally useful?
Neil
More information about the TYPO3-dev
mailing list