[TYPO3-dev] $TCA: Conditional Requirment for Fields in BE-Forms
Malte Jansen
mail at maltejansen.de
Wed Oct 24 18:31:19 CEST 2007
Hi!
An importent feature is missing, but after somework I have finished to
develope required-fields with conditions. Now your opinion is
importent!!!!! Feel free to test it ;)
"tca.php"
...
"my_field" => Array (
"label" =>
"LLL:EXT:my_ext/locallang_db.xml:tx_myext_table.my_field",
"config" => Array (
"type" => "input",
"size" => "20",
"eval" => "required,condition[<check>],trim",
)
),
...
Here is Syntax:
<bool> = ! | empty
<fieldname> = any field name (fieldtype must be: input,radio,check,text)
<fieldvalue> = [a-zA-Z0-9\w] (fieldtype:input|text)
<itemnumber> = [0-9] (fieldtype:check|radio)
<value> = empty | <fieldvalue> | <itemnumber>
<field> = <bool><fieldname>[;<value>]
<and> = <check>&<check>
<or> = <check>|<check>
<check> = \[<field> | <and> | <or> | <check> \]
If you leave the value empty it only checks wheater the field is not
empty (input/text) or the first item is checked/true (radio/check).
Examples:
"eval" => "required,condition[checkbox1]",
"eval" => "required,condition[checkbox1&radio1;2]",
"eval" => "required,condition[field1|checkbox1]",
"eval" => "required,condition[field2|[field1&radio1]]",
Here is the bug with patch (Current Version: v4):
http://bugs.typo3.org/view.php?id=6173
It would be nice to get some feedback...
Malte
More information about the TYPO3-dev
mailing list