For my typo3 extbase extension, I have a view which just a form for uploading pictures.On form submission, the user is redirected to another view. Now, I want to display this fluid view with the form as a modal dialog.Is this possible and if yes, how can it be achieved?
Asked
Active
Viewed 717 times
1 Answers
0
Use your domain model.
1) Assign a new domain model to your view:
public function formAction(Tx_MyExt_Domain_Model_MyObject $newMyObject = NULL) {
$this->view->assign('newMyObject', $newMyObject);
}
Your form should look like:
<f:form action="post" name="myObject" object="{newMyObject}">
<f:form.textbox property="name" />
<f:form.textbox property="surname" />
etc..
</f:form>
2) Send the form values as object to your post/show/dialog action, add the object via the repository and assign it to your view:
public function postAction(Tx_MyExt_Domain_Model_MyObject $myObject) {
// saves the object
$this->myObjectRepository->add($myObject);
$this->view->assign('object', $myObject);
}
Another way without using a domain model looks like:
public function postAction() {
$arguments = $this->request->getArguments();
$this->view->assign('arguments', $arguments);
}

Arek van Schaijk
- 1,432
- 11
- 34