[TYPO3-project-formidable] "Form inside a renderlet:LISTER" example problems and possible fix
Gary Wong
gary.wong at spingroup.com
Sat Oct 25 00:04:28 CEST 2008
First, I am using v2.0.248
In this article:
http://formidable.typo3.ug/typo3-form-news/news/0026-forms-inside-a-renderlet-lister/back/67.html
I couldn't get the
when="after-init-datahandler"
checkpoint to fire.
I did some debugging and for whatever reason that checkpoint is not tripped.
So, I changed it to
when="before-render"
and it works fine. Anyone have an explanation?
Second - the PHP function - I think Formidable is now returning the form
data a little differently. I had to change the PHP function to the
following:
function _editForm($aParams, $oForm) {
$postArray = t3lib_div::_POST($oForm->formid);
//$titles = $postArray['pages:title'];
$pages= $postArray['pages'];
//t3lib_div::debug($pages);
if ($aParams['uid']) {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'uid="' .
$aParams['uid'] . '"',
array('title' => $pages[$aParams['uid']][title]));
}
else {
foreach ($pages as $id => $value) {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'uid="'
. $id . '"', array('title' => $value[title]));
}
}
}
For reference, the posted array from the lister looks like this:
Array
(
[pages] => Array
(
[1] => Array
(
[title] => About Us
)
[2] => Array
(
[title] => Contact Us
)
)
[AMEOSFORMIDABLE_SERVEREVENT] => 20b4ed8ce2
[AMEOSFORMIDABLE_SERVEREVENT_PARAMS] => YToxOntzOjM6InVpZCI7czoxOiIxIjt9
[AMEOSFORMIDABLE_SERVEREVENT_HASH] => 5c91fd5d7d
[AMEOSFORMIDABLE_ADDPOSTVARS] => []
[AMEOSFORMIDABLE_VIEWSTATE] =>
[AMEOSFORMIDABLE_SUBMITTED] => 1
)
--
Gary Wong
Spin Group, Inc.
Web, eCommerce, Online Marketing - Over 10 years strong!
http://www.SpinGroup.com
More information about the TYPO3-project-formidable
mailing list