[TYPO3-mvc] f:form.select, multiple and selected values

Claus Due claus at wildside.dk
Thu Sep 6 17:00:18 CEST 2012


> but, doesn't extbase already put that hidden empty value?
> i see it, in my html!

Hmm - in that case I'm not sure how to force Extbase to build an empty array… will you need to check this and set it in your Controller maybe? What happens if the field name is tx_myext[pi][field][] and the value is 0 (zero)? Will Extbase build the array but discard the empty value and leave an empty array?

Sorry that I can't say for sure. I believe this also depends on which type of PropertyMapper is being used - but I assume you use the rewritten one, so maybe there is a way to configure it to allow constructing empty arrays from the initializeXyzAction() method. I just don't know :(

Cheers,
Claus


More information about the TYPO3-project-typo3v4mvc mailing list