[TYPO3-mvc] date in textfield not showing up after sending the form

Adrian Dymorz t3 at adrian.dymorz.ch
Tue Jun 18 21:46:41 CEST 2013


Hello,

I am trying to create an extbase/fluid based form which lets the user enter
a date into a textfield.
I am using TYPO3 6.1 and created the extension using extension_builder
2.5.2.

The Partial Test/FormFields contains the following generated code:
<f:form.textfield property="date"  value="{test.date->f:format.date()}" />

After entering an invalid date, I get the expected error message

newTest.date: 
The date "asdf" was not recognized (for format "Y-m-d\TH:i:sP").

but the value is not show in the textfield again.

I think this might be cause by the fact, that for the textfield both
parameters "property" and "value" are set. According to the code in class
"AbstractFormFieldViewHelper" this should be like this:
$this->registerArgument('property', 'string', 'Name of Object Property. If
used in conjunction with <f:form object="...">, "name" and "value"
properties will be ignored.');

I tried if the value gets shown in the textfield when no validation error
eccours in this field, but it does not show up.

I am now wondering what the correct way is to get the entered date to be
displayed in the text field. I did not find a hint using google and reading
"Zukunftssichere TYPO3-Extensions mit Extbase und Fluid".

Best regards
Adrian



More information about the TYPO3-project-typo3v4mvc mailing list