[TYPO3-english] First value empty in select

Tomiţă MILITARU tomita.militaru at gmail.com
Wed Nov 24 10:35:43 CET 2010


I would like in a select box, that contains some values retrieved from a
database, the first value (default / selected) to be empty the first time.
This is my code in ext_tables.php:
$tempColumns = array(
    'tx_cegallery_albumcover' => array(
      'exclude' => 1,
      'label' =>
      'config' => array(
        'type' => 'select',
        'foreign_table' => 'tx_dam_cat',
        'size' => 1,
        'maxitems' => 1,
        'default' => '0'

The attribute 'default' makes the first value from the db to be selected and
the only solution I found is to use *itemsProcFunc*, but was wondering, is
there another way to do it?

Thank you!

Engr. Tomiţă MILITARU
Board Member SbLUG
Web Developer
Tel. +40741064681

More information about the TYPO3-english mailing list