Ok, I know this may not be your issue but I'm pulling my hair out. I thought subform_element would be a really quick and easy way to combine the user and uprofile edit pages. BUT, I just can't get the user edit form to display. I don't know if I'm passing the wrong thing in as '#arguments' or what. What should I pass in?

Any help or suggestions would be greatly (gravely?) appreciated.

   $account = user_load(array('uid' => arg(1)));
    $form = array();
    $form['account'] = array(
        '#type' => 'subform',
        '#id' => 'user_edit',
        '#arguments' => array($account),
        '#data_separation' => TRUE,
    );

    $uprofile_node = nodeprofile_load('uprofile', arg(1));
    $form['uprofile'] = array(
        '#type' => 'subform',
        '#id' => 'uprofile_node_form',
        '#arguments' => array($uprofile_node),
        '#data_separation' => TRUE,
    );

    $form['#submit']['subform_element_submit'] = array();
    return $form;

Comments

urbanarpad’s picture

Status: Active » Closed (fixed)

OM freakin' G!

The user edit form id is 'user_edit_form' NOT 'user_edit'

Aaaargh.

Works now.

        '#id' => 'user_edit_form',