[TYPO3-dev] BE--Populate select field based on another field

Dmitry Dulepov typo3 at accio.lv
Fri Sep 8 08:22:57 CEST 2006


Hi!

Ryan Hayle wrote:
> Anyone know if there's an easy way to do this?  When editing a record, I 
> chose the first field,  then the second field is loaded with new values 
> based on the first.  Either ajax or old-fashioned reload is okay.  I 
> know it does this when changing page type, so there must be a way.  Of 
> course ajax is even better. :)

It is possible but it is too much to describe here. You will need to 
change your $TCA for this. Details can be found here:
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/

Look for "requestUpdate" in "[ctrl] section" and "foreign_table_where" 
for "select" field. Basically you mark one field as "requestUpdate" and 
feel values in another field from this field when form is loaded. It is 
easy.

-- 
Dmitry Dulepov
http://typo3bloke.net/

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)




More information about the TYPO3-dev mailing list