[Typo3-dev] using flexform in extension records
Luite van Zelst
luite at aegee.org
Tue Sep 7 11:00:51 CEST 2004
> Grrr.... stupid mistake on my part..:
>
>> "ds_pointerField" => "list_type",
>> "ds" => "FILE:EXT:myext/flexform_ds.xml",
>
>
> Should be:
>
> "ds_pointerField" => "foobar",
> "ds" => Array (
> "foobar" => "FILE:EXT:myext/flexform_ds.xml",
> )
not quite... (if I understand it correctly).
suppose you have to fields in the tca, the first field we'll call "flex"
of type flex, and the second is a selector-box, we'll call
"mydspointer". Ok, now fill the mydspointer with 3 items (all having a
label and a value), the value of the item in the selectorbox selected by
the user is used to point to an element of the "ds=> Array (..." array
of the flex field. I think there's actually an example of this in the
core api, if you look closely.
So if the seletorbox has "First type" => "one", "Second DS" => "two" the
ds should look like:
"ds" => Array( "one" => "<xml somexml>", "two" => "someotherxml")
but I agree it is a bit confusing.
make sure to have the selectorbox accept non-numerical values if you
follow this example (there's a tca options for that).
regards, Luite.
More information about the TYPO3-dev
mailing list