[Typo3-dev] Setting a checkbox to checked by default

S. Teuber traveler_in_time at gmx.net
Thu Jan 29 16:16:13 CET 2004


Hey again,

I got the solution. :)

>> ext_tables.php:
>> ------------------- start --------------------
>> $tempColumns = Array (
>> 'tx_myext_ft1' => Array (
>> 'exclude' => 1,
>> 'label' => 'LLL:EXT:my_ext/locallang_db.php:pages.tx_myext_ft1',
>> 'config' => Array (
>> 'type' => 'check',
>
> 'default' => '1',

It must be
'default'	=> '7',

This way, 'bit' 1, 2 and 4 are set 'true' - that's the combined value of 
all three boxes checked.

>
>> 'cols' => 4,
>> 'items' => Array (
>> Array('LLL:EXT:my_ext/locallang_db.php:pages.tx_myext_ft1.I.0', ''),
>> Array('LLL:EXT:my_ext/locallang_db.php:pages.tx_myext_ft1.I.1', ''),
>> Array('LLL:EXT:my_ext/locallang_db.php:pages.tx_myext_ft1.I.2', ''),

Sven




More information about the TYPO3-dev mailing list