[Typo3-dev] Tricky Form Configuration with $TCA

Michael Scharkow mscharkow at gmx.net
Thu Dec 2 23:41:55 CET 2004


Hi everyone,

the short version:
Can I render an input form A based on the value of a select-type field B 
(specifically, based on the UID of the selected table record) with $TCA?
in other words: I need a dropdown-selector A filled with values from a 
table record selected in $TCA field B.

Thanks in advance and greetings,
Michael

*the really long version for those interested:*
the next big feature for the survey ext is planned to be question 
filtering. The idea is that when creating an item you may want it to be 
displayed only if question X has been answered with some value Y, or 
other boolean operators that make sense.

My question is whether this can be done with $TCA,
I need a selector for the filter question, an operator selector and a 
value field

I know I can
- use a table select for the filtering-item selector (works)
- use predefined operators for the operator-field (works)

But it would be really cool if the value selector could be a 
select-field for filter-items with fixed values (checkbox, radio, etc), 
prefilled with the available values, and a string field otherwise.

So the last field would probably be a userfunc type which would need the 
uid of the filter question selector as an argument, than make an sql 
query and fill the selector field with appropriate values. Is this 
possible, and how?

-->SNIP
http://typo3.org/documentation/document-library/doc_core_api/columns_fieldnam-9/ 
says

"Two arguments will be passed to the function/method: The first argument 
is an array (passed by reference) which contains the current information 
about the current field being rendered. The second argument is a 
reference to the parent object (an instance of the t3lib_TCEforms class)."
<--SNAP

Since the information I need is not in the current field but in some 
other, I possibly need the second argument which I do not understand.


PS: I know I could just use one text field in which the user can define 
some filtering rules in some syntax, but that wouldn't be mouse clicker 
friendly, I guess.




More information about the TYPO3-dev mailing list