Closed (fixed)
Project:
Drupal core
Version:
4.6.9
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2006 at 12:48 UTC
Updated:
21 Aug 2006 at 17:08 UTC
The documentation for form_hidden states that it takes 4 parameters:
$name The internal name used to refer to the field.
$value The stored data.
$edit The array name to prefix to the $name.
$attributes An array of HTML attributes for the input tag
However, function as released only supports two parameters:
function form_hidden($name, $value) {
return '<input type="hidden" name="edit['. $name .']" value="'. check_plain($value) ."\" />\n";
}
I've patched my local copy of Drupal so that:
function form_hidden($name, $value , $edit = 'edit' , $attributes = NULL ) {
return '<input type="hidden" name="' . $edit . '[' . $name . ']" value="' . check_plain( $value ) . '"' . drupal_attributes($attributes) . "\" />\n";
}
and it seems to work as described in the documentation.
Comments
Comment #1
magico commentedhttp://api.drupal.org/api/4.6/function/form_hidden only states that it has 2 parameters.
Comment #2
magico commented