disable the preview and delete buttons on node edit form I want to disable the preview and delete buttons on node edit form.I have used the following code.But it is not working. where am i wrong with this?

function mymodule_form_alter(&amp;$form, $form_state, $form_id) {
// Check for a particular content type's node form.
  if ($form_id == 'node-gallery-item-node-form') {
    drupal_set_message("Formid");

    unset ($form['edit-preview']);
    unset ($form['edit-delete']);

  }
}
Since you are not checking for any particular condition in your code, I would suggest that you remove the preview option from the content type settings.

admin/structure/types/manage/[you_content_type]


Regarding the delete button if you can do it using permissions, you should always do it using permissions. If you do not want to revoke the permission but just want to hide for a particular screen then use 

$form['actions']['delete']['#access'] = FALSE;