[TYPO3-mvc] Multi step forms and validation
Mam Violeng
mam.violeng at yejj.com
Mon Feb 22 04:42:07 CET 2010
Hi Nikolas,
I also want to try something like this (about five step forms), here is
my example.
step 1 have 1 field "field1"
Step 2 have 1 field "field2"
..
Step 5 have 1 field "field5"
I have separate 5 difference action like "step1Action" to "step5Action"
here is my sample code in each action in the controller
function step1Action (Tx_ExtKey_Domain_Model_Project $project){
$this->view->assign('project',$project);
}
function step2Action (Tx_ExtKey_Domain_Model_Project $project){
$this->view->assign('project',$project);
}
..
here is my fluid form (step1.html)
<f:form method="post" controller="Project" action="step2" name="project"
object="{project}">
<label for="field1">Field1</label><br />
<f:form.textbox property="field1" />
<f:form.submit class="submit" value="Submit"/>
</f:form>
..
and other step almost the same template only different action.
Here is my problem now:
When I submit from step1 to step2 than it work properly but when I
submit from step2 to step3 then appear this error message.
*****
The value must be of type "Tx_ExtKey_Domain_Model_Project", but was of
type "array"
*****
I don't know if I go on the right way.
Could you please help me with some hint how you implement this?
Best regards,
Violeng Mam
More information about the TYPO3-project-typo3v4mvc
mailing list