[TYPO3-dev] TCA foreign_table required minitems => 1 maxitems => 1
Jacco van der Post
jacco at id-internetservices.com
Mon Aug 2 22:44:27 CEST 2010
Hi
In my tca.php I want to force required :
'job_location' => array (
'exclude' => 0,
'label' =>
'LLL:EXT:jpjobs/locallang_db.xml:tx_jpjobs_job.job_location',
'config' => array (
'type' => 'select',
'foreign_table' => 'tx_jpjobs_location',
'foreign_table_where' => 'ORDER BY tx_jpjobs_location.location',
'size' => 10,
'minitems' => 1,
'maxitems' => 1,
etc.
When I change maxitems higher than 1, than the required icon appears in
the backend record. On 1 not, so it's possible for an editor to save the
record without filling in this field.
Also 'eval' => 'required' did not help...
---------
Another question, is it possible to set a pre-selected value on a select?
'company_country' => array (
'exclude' => 0,
'label' =>
'LLL:EXT:jpjobs/locallang_db.xml:tx_jpjobs_job.company_country',
'config' => array (
'type' => 'select',
'foreign_table' => 'static_countries',
'foreign_table_where' => 'ORDER BY static_countries.cn_short_en',
'size' => 1,
'minitems' => 1,
'maxitems' => 1,
)
Something like 'selected' => 'Netherlands'
thx Jacco
More information about the TYPO3-dev
mailing list