Format a general form item.
Parameters
$title: The label for the form item.
$value: The contents of the form item.
$description: Explanatory text to display after the form item.
$id: A unique identifier for the form item.
$required: Whether the user must fill in this form element before submitting the form.
$error: An error message to display alongside the form element.
Return value
A themed HTML string representing the form item.
Related topics
11 calls to form_item()
- blog_user in modules/
blog.module - Implementation of hook_user().
- profile_view_profile in modules/
profile.module - queue_settings in modules/
queue.module - search_form in modules/
search.module - Render a search form.
- system_user in modules/
system.module - Implementation of hook_user().
File
- includes/
common.inc, line 1054 - Common functions that many Drupal modules will need to reference.
Code
function form_item($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) {
return theme('form_element', $title, $value, $description, $id, $required, $error);
}