[TYPO3-dev] Backend extension form fields question

Cray Flatline cryangel at gmail.com
Tue Sep 9 13:11:52 CEST 2008


Dmitry Dulepov [typo3] писал:

Thanks a lot, Dmitry!! It works great! (:

But I have one more question about it.

For example I created new car with parameters:

Type: Motorcycle
Make: Honda
Model: Steed

Now I want to change type. I'm changing it to Auto. So:

Type: Auto
Make: [Invalid Value 9]
Model: [Invalid Value 3]

How I can clear Make and Model fields when I change Type? And same, how
I can clear Model field, when I change Make?

Thanks for advance!

WBR,
Cray

> 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.
> 




More information about the TYPO3-dev mailing list