[TYPO3-dev] BE-forms: setting required for single select

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Jan 12 13:18:46 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have a complete analogues situation of that of Jonas. I need nothing to add.

The point is that an empty entry is be default evaluated as valid selection.

"items" => Array (
    Array("",""),
),


Regards Elmar


On 27.09.2005 Jonas wrote:



Hi

I added a select box to the "page" TCA which gets it's options from an
other table. Nothing special everything works  :-)

But I need to set the field as 'required', I need this little yellow
flag if there is nothin selected.

I already tried this:
1. Add a empty Entry within the items array (of course)
2. Set 'allowNonIdValues' => 0,
3. Set "minitems" => 1,
4. Set 'eval' => 'required', (I already knew it doesn't work -> just for
input)

Is there any possibility to set this field as required?

"tx_xyz_author" => Array (
"exclude" => 1,
"label" => "LLL:EXT:xyz/locallang_db.php:pages.tx_xyz_author",
"config" => Array (
"type" => "select",
"items" => Array (
Array("",""),
),
"foreign_table" => "tx_xyz_people",
"foreign_table_where" => " ORDER BY tx_xyz_people.uid",
"size" => 1,
"minitems" => 1,
'allowNonIdValues' => 0,
"maxitems" => 1,
'eval' => 'required',
)
),

Thanks....
Jonas




- --
Climate change 2006 is killing people: floods in California, drought and fires
in Australia, Texas, Sahel, Oklahoma, South Africa. The Bush administration is
responsible for corruption of the Kyoto Protocol. The US majority is responsible
to the world for reelection of a convictable [...censored by Echelon...].
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDxkkmO976RNoy/18RAheFAKCWSUNq+or8VHKofDSp/kM3JfMUYgCfXECo
kKaZEc5e/PGjXzqeh7h/YVk=
=rzZK
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list