October 21, 2008

Personalizing a Response Page of a TYPO3 Mail Form

Cat: TYP03, TypoScript

Today, I had a client who wanted to personalize a page being used as a response to a form created by a standard TYPO3 content element. The response page is the page specified in the "Jump to Page" field in the mail form content element.

I had never done this before, but it turned out to be very easy.

The following TypoScript generated on your response page will do the trick.

10 = COA_INT
10.10 = TEXT
10.10.value = Howdy,
10.10.dataWrap= | {GPvar:firstname}
10.10.htmlSpecialChars = 1

This will replace {GPvar:firstname} with the name the person entered in the mail form field called "firstname." The COA_INT is used because the output cannot be cached.

Also, if you install the extension TypoScript Code (extension key: typoscript_code) you can place this TypoScript directly on the page like any other content element. This is a very handy extension for this kind of situation.