Remove “preview” button in Drupal
Sometimes the preview button is unnecessary or unwanted in your Drupal installation. To remove the preview button, add this function to a custom module.
In this case, we wanted to remove the button from the node form for a “property” content type.
function digitalstax_customizations_form_alter(&$form, $form_state, $form_id) {
if($form_id=='property_node_form') {
unset ($form['buttons']['preview']);
}
}
| Print article | This entry was posted by Raymond on April 18, 2010 at 5:44 am, and is filed under Drupal. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |
Comments are closed.