Remove the "upload" button from the image field form element in drupal 7 As the title suggests I need to remove the upload button from an imagefield form element within D7. 

I can't seem to find the element itself within the form array (via hook_form_alter) and I'm just wondering if it needs to be done a different way perhaps.

(I do realise the button can be hidden with CSS but I'd rather not take that option if I can help it.)
Put this code in template.php of your theme, and rename the function.


/**
 * Implementation theme_image_widget($variables)
 */
function THEMENAME_image_widget($vars){
  unset($vars['element']['upload_button'], $vars['element']['remove_button']);
  return theme_image_widget($vars);
}