[TYPO3-dev] How do I add existing records with IRRE?

JoH asenau info at cybercraft.de
Fri Jan 22 19:12:50 CET 2010


> I understand what you are saying here, but what I try to do is add a
> selectorbox to editform of the parent record for adding existing
> child records. I think this should be possible using the option
> foreign_selector, I just don't get it to work yet....

That's exactly what I meant. The Core API doc says

<quote>A selector is used to show all possible child records that could be
used to create a relation with the parent record. It will be rendered as a
multi-select-box. On clicking on an item inside the selector a new relation
is created.The foreign_selector points to a field of the foreign_table that
is responsible for providing a selector-box - this field on the
foreign_table usually has the type "select" and also has a "foreign_table"
defined.</quote>

Take this example:

parents table:

child_records {
    type => inline
    foreign_table => children
    foreign_selector => parent_records
}

parent_records is a field of the foreign(!) table

children table:

parent_records {
    type => select
    foreign_table => parents
}

got the point?

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com






More information about the TYPO3-dev mailing list