form_hidden($name, $value)
drupal/includes/common.inc, line 1373
Store data in a hidden form field.
This function can be useful in retaining information between page requests, but be sure to validate the data on the receiving page as it is possible for an attacker to change the value before it is submitted.
$name The internal name used to refer to the field.
$value The stored data.
A themed HTML string representing the hidden field.
| Name | Description |
|---|---|
| Form generation | Functions to enable output of HTML forms and form elements. |
| Input validation | Functions to validate user input. |
function form_hidden($name, $value) {
return '<input type="hidden" name="edit['. $name .']" value="'. check_plain($value) ."\" />\n";
}