[TYPO3-english] First value empty in select

Søren Malling soren.malling at gmail.com
Wed Nov 24 10:39:21 CET 2010


Hi,

The documentation on the select type, have a example with a empty first-value.

http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/#id4286885

Regards,

Søren Malling

TYPO3 Brugergruppe Danmark: www.typo3danmark.dk
Twitter: twitter.com/sorenmalling



On Wed, Nov 24, 2010 at 10:35 AM, Tomiţă MILITARU
<tomita.militaru at gmail.com> wrote:
> Hello,
>
> 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' =>
> 'LLL:EXT:user_ce_gallery/fields/locallang_db.xml:tx_dam.tx_cegallery_cover',
>      '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
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list