[TYPO3-mvc] Blank Flexform fields overwrite TypoScript values???

Franz Koch typo3.RemoveForMessage at elements-net.de
Wed Feb 24 17:35:19 CET 2010


Hi,

> But this way you cannot set an empty value via flex form.

in which cases do you need to know if the flexform value was NULL/empty 
and don't want it to fall back to the default TS configuration if 
available? If you don't have a TS setting and a NULL value in flexform, 
you can check for it via isset and know then that it was NULL. As soon 
as you have a default TS settings and allow to override it via TS, you 
don't care if the flexform was NULL but you need to get the default 
value if flexform was NULL/''.

> And it doesn't work for numbers because TYPO3 doesn't like NULL values for them. Any empty string
> will become a 0.

In which cases? I use this override method since ages and never had any 
problem in any complex flexform. If you have a select box in your 
flexform, simply add a additional select option with value '' and the 
label 'default settings' to it and it'll nicely fall back to the default 
value. If anything else is selected (maybe even the value 0) it'll 
override the TS setting and everything is perfect.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list