[TYPO3-mvc] inline relations - is it possible to have the option to select an existing record?

Peter Niederlag typo3-list at niekom.de
Tue Nov 22 14:45:56 CET 2011


Hello,

Am 22.11.2011 11:57, schrieb Stephen Bungert:
> I have some relations in my model that the extension builder created as 
> inline, but when I try and create a new record the BE form only displays the 
> option to create a new record for my inline field, what do i have to change 
> in the field config so that it also allows you to select existing records? I 
> may not always want to create a new record. One of the existing ones may be 
> ok.

I guess we are talking about the "classical" BE (not extbase/fluid)?
If so then this is a pure matter of $TCA.

In $TCA for inline there is a setting 'foreign_selector', which IMO can
possibly achieve what you aim for.

example...

'config' => array(
  'type' => 'inline',
  'foreign_table' => 'tx_foobar_domain_model_foo',
  'foreign_field' => 'fieldxyz',
  'foreign_selector' => 'fieldabc',
  'maxitems'      => 5,
  'appearance' => array(
    'useCombination' => 1,
    'collapseAll' => 1,
    'levelLinksPosition' => 'bottom',
    'newRecordLinkAddTitle' => 1,
   ),
 ),

Greets and hth,
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *


More information about the TYPO3-project-typo3v4mvc mailing list