[TYPO3] Insertion of values from $_SESSION into a HTML cObject

Hasse Feldthaus hasse at ebisu.dk
Mon Feb 27 18:39:50 CET 2006

Hi ...


I have some HTML cObjects on different pages, containing HTML form input
fields. Every time a HTML form is submittet, I (by the action parameter of
the form) stuff whatever the user has entered into $_SESSION before the user
is directed to the next part of the form. If the user browses thru earlier
filled pages, I want the fields to be preloaded with the data entered


I want to preload them with values I have in $_SESSION.

If I had total access to the HTML (ie. if it wasn't made in Typo3), I would
have done something like this:


<input name="myField" value="<?PHP echo($_SESSION['myField']); ?>">



...but unfortunately I don't think Typo3 HTML cObjects let me execute PHP
like that. :-(


I have (thanks to Sune Vestergaard) tried to insert fields like this:

<input name="myField" value="{global : HTTP_SESSION_VARS | myField}">

and inserted either one of the following in my TypoScript:

temp.10.stdWrap.insertData = 1 (which I have loaded with my HTML cObject)

tt_content.html.insertData = 1

(and almost any combination of these :-( )


However I have still not managed to get anything from the DB out in the HTML
form fields. :-(

If TypoScript replaces the {...}, it is with nothing (and I know for sure
that the data is in the $_SESSION!).


Another problem I have, is that my HTML cObject also has Javascript in it (I
didn't promise this should be simple ;-) ).

If Typo3 replaces the fields, it also nukes my {...} blocks inside my

If only I could get something more usefull than an empty string, I think I
could code me out of the {}'s in my Javascript (it wouldn't be pretty, but
it could work) ... but I have yet to see usefull content in the form fields!


Does anyone have a better way to do this? (and loading the whole lot into
cookies or anything clientside fancy stuff doesn't work for me ... I have a
lot of fields, and I have to take alot of browsers into account) :-(


let me know, if you want real code snippets! :-/


(-:H at zze


More information about the TYPO3-english mailing list