[TYPO3-mvc] Fluid: Complex forms best practice
Bastian Waidelich
bastian at typo3.org
Thu Jul 9 11:44:36 CEST 2009
Sebastian Fischer wrote:
Hi Sebastian,
> though its an solution for one field, its no solution for many fields.
> Imagine 20 additonal parameter of the method.
You're right, IMO something like this should work (but it doesn't yet):
<f:form action="test" />
<f:form.textbox name="foo[firstName]" />
<f:form.textbox name="foo[lastName]" />
<f:form.textbox name="bar[newsletter]" />
</f:form>
...
/**
* @param array $foo the foo form data
* @param array $bar the bar form data
*/
public function testAction(array $foo, array $bar) {
// $foo['firstName']
}
That does not work currently, cause the property mapper tries to
instantiate a class of type "array"..
But this should be relatively easy to implement. what do you think?
Bastian
More information about the TYPO3-project-typo3v4mvc
mailing list