Zusätzliche Submit-Schaltfläche in Node-Formularen
Manchmal benötigt man auf Node-Formularen eine zusätzliche Schaltfläche zum Speichern.
Dies lässt sich ganz einfach über ein kleines Modul erreichen.
; $Id$
name = "Second submit"
description = "Second submit button on node forms."
core = "6.x"secondsubmit.info
<?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;
}
}
secondsubmit.module
Mit diesem Modul wird einfach nur die Standard-Submitschaltfläche kopiert und die Kopie ganz oben im Formular platziert.
- Anmelden oder Registrieren um Kommentare zu schreiben

Neue Kommentare
vor 1 Tag 5 Stunden
vor 2 Tagen 30 Minuten
vor 2 Tagen 18 Stunden
vor 1 Woche 4 Stunden
vor 1 Woche 7 Stunden
vor 1 Woche 4 Tagen
vor 1 Woche 4 Tagen
vor 1 Woche 4 Tagen
vor 4 Wochen 1 Tag
vor 4 Wochen 2 Tagen