Hi there,
I have a question concerning the entities of the phalcon-forms. I have a form-model, which is used to manipulate data of two models simultaneously. One user-model with basic user-information and one corresponding profile-model (profile belongs to user) . Based on the user-type, there are different profile models, which is why I have to split both models up.
My question is how to bind the entity-data of both models to my single-form?
$user = User::findFirst($id);
$profile = $user->getProfile();
/** With this, only fields corresponding to the user-model are filled out in the form*/
$this->view->form = new UserForm($user);
/** With this, only fields corresponding to the profile-model are filled out in the form*/
$this->view->form = new UserForm($profile);
Is there a way to combine both models in one entitity or something?