[TYPO3-english] Default value of FE news form set to FE user's name [x-post from typo3.projects.tt-news]

Ulrik H. Kold uk at oerskov.dk
Tue Jul 7 15:04:09 CEST 2009


Hi group,

I'm struggling with a FE news form, and I cannot figure out if there is 
a way to set a form field value to a FE user property?

That is, I have a news create/edit form from tx_newsfeedit which I would 
like to give some default values. I have figures out that a simple TS 
snippet like this sets the default datetime:

plugin.tx_newsfeedit_pi1.mthfeedit.create.defaultValues.datetime = now

But as the user is already logged in, when they access the FE news form, 
I would like to simply set the author name to the FE user name.

That is, I would like to do something like this:

plugin.tx_newsfeedit_pi1.mthfeedit.create.defaultValues.author = TEXT
plugin.tx_newsfeedit_pi1.mthfeedit.create.defaultValues.author.data = 
TSFE:fe_user|user|name

But apparently this won't work: The value of the field is 
"TSFE:fe_user|user|name" and not e.g. "Ulrik H. Kold".

Can somebody help me?
-- 

Ulrik H. Kold
Ørskov Web - http://www.oerskovweb.dk


More information about the TYPO3-english mailing list