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

magico’s picture

Version: 4.6.3 » 4.6.9

http://api.drupal.org/api/4.6/function/form_hidden only states that it has 2 parameters.

magico’s picture

Status: Active » Closed (fixed)