can't delete the preview button I have used the following code to delete the preview button which is on one of my create content type pages, but its not doing anything, what am I doing wrong?

function example_module_form_alter(&amp;$form, $form_state, $form_id) {
// Check for a particular content type's node form.
if ($form_id == 'example_content_type_node_form') {
drupal_set_message("entering formId");

unset ($form['preview']);
}
}


the drupal_set_message does go off, so I know that I am entering the if statement. I have put this code in a custom module (example_module).
You don't need to use custom code to delete the preview button.  On the Content Type administration page at admin/structure/types/manage/your_content_type, you can selection Disabled for Preview before submitting under Submission form settings.  This will remove the preview button for that content type.