Trying to achieve something similar with a regular select field and ###PAGE_TSCONFIG_ID###, but the value is not replaced. Instead, there is an error message:
1: Attempt to insert record on page '[root-level]' (0) where this table, tx_kofomi_domain_model_locations, is not allowed
(The table in question is only allowed in sys-folders...)
Strangely enough, the error message refers to the 'parent' table, not the one that should gain a new entry - which anyway never shows up in the DB.
###CURRENT_PID### works (but is of no help).
TYPO3 CMS 6.1.1, php 5.4.10 (with XCache)
/// TCA
$TCA['tx_kofomi_domain_model_events'] = array(
[...],
'location' => array(
'exclude' => 0,
'label' => 'LLL:EXT:kofomi/Resources/Private/Language/locallang_db.xlf:tx_kofomi_domain_model_events.location',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_kofomi_domain_model_locations',
'foreign_table_where' => "ORDER BY tx_kofomi_domain_model_locations.name",
'size' => 5,
'autoSizeMax' => 10,
'minitems' => 0,
'maxitems' => 1,
'wizards' => array(
'_PADDING' => 2,
'_VERTICAL' => 1,
'_POSITION' => 'right',
'_DISTANCE' => 0,
'_VALIGN' => 'middle',
'suggest' => array(
'type' => 'suggest',
),
'edit' => array(
'type' => 'popup',
'title' => 'Edit location',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => array(
'type' => 'script',
'title' => 'Add new location',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_kofomi_domain_model_locations',
'pid' => '###PAGE_TSCONFIG_ID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
'list' => array(
'type' => 'script',
'title' => 'List locations',
'icon' => 'list.gif',
'params' => array(
'table' => 'tx_kofomi_domain_model_locations',
'pid' => '###PAGE_TSCONFIG_ID###',
),
'script' => 'wizard_list.php',
)
)
),
),
[...]
};
/// TCEFORM
TCEFORM.tx_kofomi_domain_model_events.location.PAGE_TSCONFIG_ID = 44
// Reference:
http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html
-> "Simple selector box with TSconfig markers"