form_button
- Versions
- 4.6
form_button($value, $name = 'op', $type = 'submit', $attributes = NULL)
Format an action button.
Parameters
$value Both the label for the button, and the value passed to the target page when this button is clicked.
$name The internal name used to refer to the button.
$type What type to pass to the HTML input tag.
$attributes An associative array of HTML attributes to add to the form item.
Return value
A themed HTML string representing the button.
Related topics
Code
includes/common.inc, line 1392
<?php
function form_button($value, $name = 'op', $type = 'submit', $attributes = NULL) {
return '<input type="'. $type .'" class="form-'. $type .'" name="'. $name .'" value="'. check_plain($value) .'" '. drupal_attributes($attributes) ." />\n";
}
?>Login or register to post comments 