This project is no longer maintained and no further public releases are planned.

No further support will be given.

Feel free to fork the git repository.

How to access Formhandler values

In TypoScript

If you wanted to access GET/POST values in TypoScript, you normally would use "data" for it.

myMarker = TEXT
myMarker.data = GP:formhandler|name

When using Formhandler (especially with multi step forms), the values may not be available in the GET/POST array, but stored internally in the Formhandler session. Formhandler hooks into stdWrap to make it possible to access these values in TypoScript. All you have to do is use the setting "sanitize" to tell Formhandler to temporarily substitute the current GET/POST values with the ones that are stored in the session.

myMarker = TEXT
myMarker {
  data = GP:formhandler|name
  sanitize = 1
}

Please note, that in the examples above "formhandler" is the string you set as "formValuesPrefix".

In PHP

If you want to access the GET/POST values in a user function, you can get them from \Typoheads\Formhandler\Utility\Globals.

public function getName($content = '', $conf = array()) {
        $globals = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Typoheads\Formhandler\Utility\Globals::class);
        $gp = $globals->getGP();
        return $gp['name'];
}

to top