[FLOW3-general] Creating two objects in one form
Robert Lemke
robert at typo3.org
Wed Aug 1 10:38:56 CEST 2012
Hi David,
On 31.07.2012, at 22:17, David Sporer <david.sporer at googlemail.com> wrote:
> sorry perhaps this is a really stupid question but I'm currently too tired
> to solve it.
>
> I have two models Customer and CustomerUser and I want to create a
> Register.html Fluid Template to create both so the visitor has to enter
> information about his company and also his personal email address (which is
> the username), firstname, lastname and his password.
>
> Am I missing something fundamental or is it easy to accomplish?
Unless I missed something fundamental, you should easily be able to solve this
by providing a createAction() with multiple arguments:
public function createAction(Customer $customer, CustomerUser $customerUser, …)
I'm not completely sure how error handling behaves in such a setting – would be great
if you could report back on that!
Cheers,
Robert
--
Robert Lemke
Lead Developer TYPO3 Phoenix and FLOW3
Co-Founder TYPO3 Association
Blog: robertlemke.de/blog
Get involved: typo3.org – flow3.org
More information about the FLOW3-general
mailing list