[TYPO3-mvc] Fill TCA field default with be_user realName

Henk Scholten henk at wolfsstyle.nl
Fri Jan 17 17:27:04 CET 2014


Nobody?

Henk Scholten schreef op 15-01-14 19:58:
> Sorry for my misunderstanding.
> I tried it with:
>
> public function getSingleField_preProcess($table, $field, array &$row,
> $altName, $palette, $extra, $pal, t3lib_TCEforms $parentObject) {
>      if ($table == 'tx_treg_domain_model_download') {
>          if (empty($row['author'])) {
>              $row['author'] = $GLOBALS['BE_USER']->user['realName'];
>          }
>      }
> }
>
> But now the author only get filled after the form is submitted. I want
> to fill the author field default by each new download.
> Is this possible?
>
> Regards,
> Henk
>
> Philipp Gampe schreef op 15-01-14 19:19:
>> Hi Henk,
>>
>> Henk Scholten wrote:
>>
>>> However the approach tt_news using is not working in TYPO3 6.2
>>
>> I said ext:news not ext:tt_news. Anyway here is a direct link:
>>
>> https://git.typo3.org/TYPO3v4/Extensions/news.git/blob/HEAD:/Classes/Hooks/Tceforms.php
>>
>>
>> The hook pre-calculates the archive time based on the current time and an
>> offset which must be defined in pageTS.
>> It is a good example on how you can set any default value, even complex
>> ones.
>>
>> Best regards
>>
>



More information about the TYPO3-project-typo3v4mvc mailing list