[TYPO3-english] Powermail - prefill field using a hook
Tapio Markula
tapio.markula at xetpoint.fi
Thu Nov 13 19:36:29 CET 2008
Brian Bendtsen kirjoitti:
> Hi
>
> Im using powermail and need to prefill a textarea field with some data.
>
> I have been looking at the hooks and it looks like I can use this one
> PM_FieldWrapMarkerHook1
>
> But I dont see how I use it, can someone show me an example?
>
> I know the basics about using hooks, so you dont need to explain that part.
>
> So far I have tried this but without luck:
>
> function PM_FieldWrapMarkerHook1($uid, $xml, $type, $title,
> $markerArray, $piVarsFromSession, $obj) {
> if($markerArray['###POWERMAIL_FIELD_UID###'] == 5) {
> foreach($piVarsFromSession['uid5'] as $key=>$value) {
> $markerArray['###VALUE###'] .= $value.'</br>';
> }
> }
> }
>
> /BB
you must pass $markerArray as reference
function PM_FieldWrapMarkerHook1($uid, $xml, $type, $title,
&$markerArray, $piVarsFromSession, $obj) {
- if you do not do that the function doesn't do anything.
More information about the TYPO3-english
mailing list