Hey zusammen,
irgendwann trifft man ja immer mal auf eine Ecke in TYPO3, in der man vorher noch nie war: In der TCA meiner Extension habe ich ein Selectfeld "Nation" und ein Selectfeld "Bundesland". Das Selectfeld Bundesland soll nun aufgrund der Auswahl in Nation alle entsprechenden Bundesländer zurückgeben.
Daher meine Frage: Wie kann ich in meiner itemsProcFunc auf den Wert des vorherigen Selectfelds (nation) zugreifen? Achja: Nachdem im Select eine "Nation" ausgewählt wurde, findet ein "requestUpdate" statt.
(Der Marker ###REC_FIELD_nation### kommt leider nicht in der itemsProcFunc an, schon probiert).
Ich bin für jeden Tipp dankbar, hänge nun schon seit ein paar Tagen an diesem Thema :/
[b]TCA.php[/b]
'exclude' => 1, 'label' => 'LLL:EXT:mm_jobs/locallang_db.xml:tx_mmjobs_content.nation', 'displayCond' => 'EXT:static_info_tables:LOADED:true', 'type' => 'select', ), 'foreign_table' => 'static_countries', 'foreign_table_where' => 'AND static_countries.pid=0 ORDER BY static_countries.cn_short_en', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, ) ), 'exclude' => 1, 'label' => 'LLL:EXT:mm_jobs/locallang_db.xml:tx_mmjobs_content.bundesland', 'displayCond' => 'EXT:static_info_tables:LOADED:true', 'type' => 'select', ), 'itemsProcFunc' => 'tx_mmjobs_func->get_available_countries', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, ) ),
[b]class.tx_mmjobs_func.php[/b]
class tx_mmjobs_func { function get_available_countries(&$params,&$pObj) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('zn_name_local','static_country_zones','zn_country_iso_nr = ###HIER BENÖTIGE ICH DEN WERT AUS FELD NATION###'); while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $countries[] = $row; } foreach ($countries as $cell => $value) { } } }