[FLOW3-general] Validation of Arrays in an Action
"Christian Müller (Kitsunet)"
christian.mueller at typo3.org
Sun Sep 23 01:34:18 CEST 2012
On 22.09.2012 15:02, David Sporer wrote:
> Hi,
>
>
>
> another question:
>
> I'm passing three arrays to an action and I'm validating these which works
> fine.
>
> But I'm struggling at the point where the validation of one array fails.
> Then I want to the new form to contain the already valid values of the other
> arrays.
>
> I saw that it doesn't work automatically.
>
>
>
> e.g.
>
>
>
> newAction(){
>
> }
Exactly here is the problem, your newAction needs to accept your three
arrays with the same names as the createAction, so it should look like this:
newAction($array1 = array(), $array2 = array(), $array3 = array()){
Which allows calling of the newAction without any parameters but if the
arrays are present they are at your disposal in the action. Of course
you need to also assign them to the view then to be able to access the
values.
Cheers,
Christian
More information about the FLOW3-general
mailing list