[TYPO3-english] Return Flexform results from a different PID

Roel Krottje remobots at gmail.com
Wed Nov 23 11:40:38 CET 2011

Hi everybody,

I'm trying to do the following:

I have a Flexform plugin (stored inside a seperate folder page element) by
which I enable the BE user to define some global settings.. Now I'm trying
to get the values of these settings stored inside the record for that
particular Flexform element located at a specific PID (the seperate
folder), but while I'm working inside a regular TCA extenstion at a
different PID..

So, to sum things up:

- PID 1 (folder) -> contains Flexform plugin called "Settings" containing
specific values entered by BE user..
- I'm trying to access these values from a tx_tcaplugin_p1, located at a
different PID (2)..

Currently, when I try to return the values from a Flexform, I can only do
so while I'm in the _pi1 of the same PID as where the Flexform is located.
I can't specify which Flexform values to retrieve from whih PID.. I'm using
this function:

/* FlexForm values loading function */
function initFlexFormVals(){
/* Function that gets the BE configuration settings from the FlexForm
Plugin: */
$this->pi_initPIflexForm(); // Init and get the flexform data of the plugin
$this->lConf = array(); // Setup our storage array...
// Assign the flexform data to a local variable for easier access
$piFlexForm = $this->cObj->data['pi_flexform'];
// Traverse the entire array based on the language...
// and assign each configuration option to $this->lConf array...
foreach ( $piFlexForm['data'] as $sheet => $data ) {
foreach ( $data as $lang => $value ) {
foreach ( $value as $key => $val ) {
$this->lConf[$key] = $this->pi_getFFvalue($piFlexForm, $key, $sheet);

 /* Implement Language options: */
$index = $GLOBALS['TSFE']->sys_language_uid;
$sDef = current($piFlexForm['data']);
$lDef = array_keys($sDef);
foreach ( $piFlexForm['data'] as $sheet => $data ) {
foreach ($data[$lDef[$index]] as $key => $val ) {
$this->lConf[$key] = $this->pi_getFFvalue($piFlexForm, $key,

But I need to get the Flexform results from a different PID instead....

Hope someone can point me into the right direction.. Any help would be
appreciated very much :)

Thanks in advance,
Roel Krottje

More information about the TYPO3-english mailing list