[TYPO3-english] Typo3 foreign_table: How to specify a specific column to a select drop down menu?
Mikel
lists at con-version.com
Tue Oct 24 13:57:35 CEST 2017
Hi,
I’m not sure, which properties you want to use for your selection.
But a basic where clause would be:
> 'foreign_table' => 'tx_icingaconfgen_domain_model_kunde‘,
'foreign_table_where' => 'AND tx_icingaconfgen_domain_model_kunde.your_property = your_value',
See https://docs.typo3.org/typo3cms/TCAReference/7.6/Reference/Columns/Select/#foreign-table-where <https://docs.typo3.org/typo3cms/TCAReference/7.6/Reference/Columns/Select/#foreign-table-where>
Mikel
> Am 24.10.2017 um 09:11 schrieb christian ewigfrost <christian-kulozik at gmx.net>:
>
> Basically a simple question (i guess):
>
> I want to add records in the Typo3 backend. Thatfor i made an extension containing 4 different classes. While adding a record of one specific class to a folder via the backend i want to have a select that lets me chose from items of a column from another class. I know i have to use a foreign_table for this like in this code:
>
> 'kundeuid' => array(
> 'exclude' => 1,
> 'label' => 'LLL:EXT:icingaconfgen/Resources/Private/Language/locallang_db.xlf:tx_icingaconfgen_domain_model_appliance.kundeuid',
> 'config' => array(
> 'type' => 'select',
> 'renderType' => 'selectSingle',
> 'foreign_table' => 'tx_icingaconfgen_domain_model_kunde',
> 'foreign_table_where' => 'ORDER BY tx_icingaconfgen_domain_model_kunde.kundeuid asc',
> 'items' => array(
> array('-- Select Kunde --', 0),
> ),
> 'size' => 1,
> 'maxitems' => 1
> ),
> ),
>
> But the problem is i can't specify that the selection should only include properties of a determined column. Instead the select drop down menu seems to use properties of the very first column. How can i specify the column of the 'kundeuid' property?
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list