Additional submit button on node forms in Drupal
Als Modul secondsubmit
- secondsubmit.info
; $Id$ name = "Second submit" description = "Second submit button on node forms." core = "6.x"
- secondsubmit.module
<?php // $Id$
/** * @file * Module definition for secondsubmit. */
/** * Implement hook_form_alter(). */ function secondsubmit_form_alter(&$form, $form_state, $form_id) { // Add a second submit button to node forms. if ($form['#node'] && ($form_id == $form['#node']->type . '_node_form')) { // Copy original submit button. $form['secondsubmit'] = $form['buttons']['submit']; // Move the second submit button to the top of the form. $form['secondsubmit']['#weight'] = -10; } }
|