Skip to main content
added 58 characters in body
Source Link
Gokul N K
  • 6.7k
  • 4
  • 35
  • 58

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(&$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']);

} }

function mymodule_form_alter(&$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']);

  }
}

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(&$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']);

} }

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(&$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']);

  }
}
Source Link
12345
  • 57
  • 1
  • 9

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(&$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']);

} }