How to render the form tag I am using this code to make the user_profile_form available on my user-profile.tpl.php so the user profile filed can be edited directly from the sure page.

function parce_preprocess_user_profile(&amp;$variables) {
  $variables['user_edit']  = drupal_get_form('user_profile_form', menu_get_object('user'));
}


Then, I can correctly print them individually using this code:

&lt;?php print drupal_render($user_edit['account']['mail']); ?&gt;


It works fine, but the problem is that the &lt;form&gt; tag doesn't appear on the page, and the form doesn't submit. When I add it manually in the template page, it works, but I was wondering how to get Drupal to insert these tags automatically. 

I tried something like this (out of pure guess):

function parce_theme($existing, $type, $theme, $path){
  return array(
    'user_profile_form' =&gt; array(
      'render element' =&gt; 'profile_edit',
      'template' =&gt; 'user-profile',
    ),
  );
}


It doesn't work. Am I doing anything wrong?
You have to render the full form, so drupal_render($user_edit) is needed.