[FLOW3-general] 2 little Fluid questions

"Christian Müller (FLOW3 Team)" christian.mueller at typo3.org
Sat May 19 12:02:32 CEST 2012


Hi,

about the select field, you don't say what kind of property you have in 
this select field but I just saw that indeed if the property mapper 
returns NULL (eg. for an empty string if you select from objects) it 
will not set that property. Maybe that is something to be changed or 
made configurable.

As for the \DateTime property that is correct there is no way in the 
core packages, you need a special viewhelper for that. In the 
TYPO3.Conference package you can find a DateTimeViewHelper that you 
could adapt to your needs.

Cheers,
Christian


On 18/05/12 00:34, Johannes Steu wrote:
> Hello,
>
> i got two little questions about fluid:
>
> 1) I got a<select>  (not with the Select ViewHelper, it's "clean" html code.) The first option of this select area should be a null-value. When i'm sending the form to updateAction to update my object the old value stays inside the database but i'd ilke to have a null to mainly unset this attribute.
> Where can i put something like if(value=="").... Is it possible to do this in the initializeUpdateAction or can i handle this inside the fluid form?
>
> 2) When editing a Model on edit.html i got a<f:form.textfield property="startDate" id="startDate" />  which should contain a \DateTime-Value. I keep getting an Error like it's an object but not a string and so on. I tried some stuff with {category.startDate ->  f:format.date(format:’d.m.Y’)} but i cant get ir working. I'd like to have on edit.html a value like d.m.Y inside the textfield. How can i do this?
>
> Thank's a lot!


-- 
Christian Mueller
TYPO3 Core Team

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the FLOW3-general mailing list