Hidding a form element before printing I want to print only bits of a very big form, my first approach was as follow: 

function THEME_preprocess_user_profile(&amp;$variables) {
    global $user;
    $account = user_load($user -&gt;uid);  
    $variables['user_edit']  = drupal_get_form('user_profile_form', $account);
    $variables['user_edit']['field_about_me'] = 'invisible';
    .....
    $variables['user_edit']['field_some_filed'] = 'invisible';

}


This does work to hide certain element, the problem is that there is way more elements i want to hide than elements i want to show, so this process can be tedious..

Would anyone think of a better way to do so ?

UPDATE : Ideally i'd like to have a function similar to drupal_get_form, but that instead only return a targeted element. 

Thanks a lot
if you want to hide elements the appropiate way is to set the #access attribute on each element to FALSE, using a hook_form_alter()


  '#access'
  
  Used by: All elements and forms
  
  Description: Whether the element is
  accessible or not; when FALSE, the
  element is not rendered and the user
  submitted value is not taken into
  consideration.
  
  Values: TRUE or FALSE.


Source: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/7#access