[TYPO3-dev] Backend extension form fields question

Dmitry Dulepov [typo3] dmitry at typo3.org
Wed Sep 3 17:22:55 CEST 2008


Hi!

Cray Flatline wrote:
> I'm creating extension with car base, where I need to have three fields
> in the background.
> 
> Type
> Make
> Model
> 
> I want to make such thing: when I add new item in BE with this extension
> (car), I choose from type for example "motorcycle", so in the Make I
> will see only makes of motorcycles (honda, kawasaki etc.) but not for
> automobiles (i.e. Ford, VW).  And when I choose something from Make
> (i.e. Honda), I want to see in Model only Honda models.
> 
> Can I do it someway? I need to use "type-field" to reload page every
> time I choose from Type or Make? Or I can make it with something like ajax?
> 
> Can anybody give me right direction to see/read/seek? (:

Firsts, you need to add "Make" field into "requestUpdates" in the "ctrl" section of TCA.

Next you need to read through "select" section of the "TYPO3 core API" and see how you can use foreign_table_where to show values of one field using values of another.

It is all possible.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/




More information about the TYPO3-dev mailing list