[TYPO3-mvc] Create an object in multi step form
Mam Violeng
mam.violeng at yejj.com
Tue Feb 23 08:19:43 CET 2010
Mam Violeng wrote:
> Hi All,
>
> I have a model of object with many fields and want to write the actions
> to create this object in multi step form (about 5 step). 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 any one please give me some hint how to implement this?
>
> Thanks,
> Violeng Mam
Hi,
I found the problem, it caused by spelling mistake with some properties.
Event now it works, but it still in dirty way because I have to store
all the previous values in the <f:form.hidden.. and I don't know how to
validate the properties in each action too.
Does any one use to implement some things like this or have any idea?
Best regards,
Violeng Mam
More information about the TYPO3-project-typo3v4mvc
mailing list