I am trying to include a user registration form within a Commerce pane form. I am currently using (within buildPaneForm
):
$user_form = $this->entityFormBuilder->getForm(user_load_by_mail($this->currentUser->getEmail()), 'guest_checkout_profile');
$pane_form['user_form'] = $user_form;
$pane_form['user_form']['#tree'] = TRUE;
The user form simply isn't shown though. I can add a test field that will show:
$pane_form['test'] = ['#type' => 'textfield', '#title' => 'test'];
$user_form
has the correct form array, with the appropriate fields from the guest_checkout_profile
form display mode.
I was pointed to IPE's embedding a form within another form, but I don't see how what I'm doing is different there (from a "get the form to show" standpoint - validation and submission I'll deal with if I get there :D).
Baby steps - how can I get the form to even be rendered?