title: Hide image field completely in drupal 7 module
body: <p>I'm trying to setup a form where some fields needs to be hidden depending on the user role. I'm doing this in my own module using hook_form_FORM_ID_alter. No problem with common text, email  or link fields (e.g. $form['field_companyname']['und'][0]['value']['#type']='hidden'). But for an image field or a multiple value file field the usual way won't work.</p>
  
  <p>Anybody can give me a clue?</p>