Altering a form to set it's target to _parent I have a form in an iframe, when the form gets submitted I need the target to be _parent.

How do we add target="_parent" to a form element in drupal 7. I am pretty sure hook_form_alter is the best way to go just not sure about what var gets edited and how.

-thanks.
to change your form you can use hook_form_alter
example

function login_form_alter(&amp;$form, &amp;$form_state, $form_id)
{
    if($form_id=="user_login_block")
    {
         $items[] = '&lt;a id="fpassword" target="_parent" title ="'.t('Request new password via e-mail.').'" href="#"&gt;'.t('Request new password').'&lt;a&gt;';
         $form['links'] = array('#markup' =&gt; theme('item_list', array('items' =&gt; $items))); 
    }
}