[TYPO3-english] Set required field for dropdown list in TCA

Eat Dimanche dimanche at web-essentials.asia
Tue Jun 15 09:22:26 CEST 2010


Hi,

I have one dropdown list which is listed from one table, and it also 
contains the dummy text for the first element that has value 0.  I try 
to set this field as a required because I don't want the record will be 
saved when the dropdown list contains the value 0, but now it does.

Here is my TCA configuration:

'group_uid' => array(
			'l10n_mode' => 'exclude',
			'exclude' => 1,
			'label'   => 
'LLL:EXT:hbt/Resources/Private/Language/locallang_db.xml:tx_hbt_domain_model_category.group_uid',
			'config'  => array(
				'type' => 'select',
				'foreign_table' => 'tx_hbt_domain_model_group',
				'foreign_table_where' => 'AND 
tx_hbt_domain_model_group.sys_language_uid IN (-1,0)',				
				'size' => 1,
				'maxitems'  => 1,
				'minitems'  => 1,
				'eval' => 'required',
			)
		),

Anyone has the idea?


Thanks,
Dimanche


More information about the TYPO3-english mailing list