Modules

Removing the preview button from a form in drupal

If you want to remove the preview button from a form in your own custom module use the following hook_form_alter method to remove the preview element from the form array.

function mymodulename_form_alter($form_id, &$form) {

    if(($form_id=="mycontenttype_node_form")||($form_id=="comment_form")) {
      unset ($form['preview']);
    }
}

New Drupal Modules Reviews Site

With the bewildering array of Drupal Modules out there how do you work out the wheat from the chaff? There is a new web site which might help you evaluate which are the killer modules at drupalmodules.com. The notion is that user can review and comment on the modules available, from which you can establish which ones are the best.

Syndicate content