2

I made my custom user-profile-edit.tpl.php using

function mytheme_theme($existing, $type, $theme, $path)
{

$hooks['user_profile_form'] = array(
                                // Forms always take the form argument.
                                'arguments' => array('form' => NULL),
                                'render element' => 'form',
                                'template' => 'templates/user-profile-edit',
                                );
return $hooks;
}

Now I want in user-profile-edit.tpl.php to render the account form (default Drupal form for users) and my profiles2 forms, from the forms i created without click the upper links.

Does anyone know how I can achieve this?

0

After creation template you need only implements form_alter and set this custom theme for whole form - $form['#theme'] = 'user_profile_form' and then you will be able to build form structure inside your template.

You can check diff module ( 'diff_node_revisions' theme ) as an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.