Removing a field from the new content form I have created a content type which consists of a title a .zip file and a screenshot using Drupal 7's site builder.  

When a user adds an instance of this content type I would like for them to only have exposed fields for the .zip file and the title.  I have a custom module that unzips the .zip file and does some analysis and I would like to extract the screenshot at this time.  

Is there anyway that I can have the new content form of my content type not show the screenshot field?
Three good options:


Display Suite has a feature to hide fields from the form
You can use hook_form_node_form_alter to remove the field


Edit: per Clive's suggestion, set ['#access'] = FALSE instead of unset($form['field_zip_file'])

Create a new module, (create MY_MODULE.info, MY_MODULE.module), and add this to MY_MODULE.module:

&lt;?php

  function MY_MODULE_form_node_form_alter (&amp;$form, &amp;$form_state, $form_id) {
    if ($form['#node']-&gt;type == 'my_content_type') {
      if ($form['nid']['#value'] == '') {
        $form['field_zip_file']['#access'] = FALSE;
      }
    }
  }



Use CSS to make it disappear:


Add this to your theme's CSS file:

body.page-node-add #edit-field-zip-file {
  display: none;
}