I dont know where this possible bug belongs.
I wanted to rearrange the order of items when editing a book.
I added this into template.php:
function phptemplate_book_node_form($form) {
$output = "\n<div class=\"node-form\">\n";
// Admin form fields and submit buttons must be rendered first, because
// they need to go to the bottom of the form, and so should not be part of
// the catch-all call to drupal_render().
/*$admin = '';
if (isset($form['author'])) {
$admin .= " <div class=\"authored\">\n";
$admin .= drupal_render($form['author']);
$admin .= " </div>\n";
}
if (isset($form['options'])) {
$admin .= " <div class=\"options\">\n";
$admin .= drupal_render($form['options']);
$admin .= " </div>\n";
}*/
$buttons = drupal_render($form['preview']);
$buttons .= drupal_render($form['submit']);
$buttons .= isset($form['delete']) ? drupal_render($form['delete']) : '';
// Everything else gets rendered here, and is displayed before the admin form
// field and the submit buttons.
$output .= " <div class=\"standard\">\n";
$output .= drupal_render($form);
$output .= " </div>\n";
if (!empty($admin)) {
$output .= " <div class=\"admin\">\n";
$output .= $admin;
$output .= " </div>\n";
}
$output .= $buttons;
$output .= "</div>\n";
return $output;
}
Ive only commented out the generation of $admin.
The purpose is to avoid $form[’authord’] and $form[’options’] getting in the bottom of the form.
This works when making a new book page, but when editing a exicting page it sems like function phptemplate_book_node_form($form) in template.php is ignored.
Comments
Comment #1
dvessel commentedThis is how forms work. To really get rid of it you'd have to unset it. I'm not sure how it would affect the internal data when doing this so do so at your own risk.
Anything not already rendered that exists in $form will come through when "drupal_render($form)" is run.