form_item

Versions
4.6
form_item($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE)

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

▾ 16 functions call form_item()

blog_user in modules/blog.module
Implementation of hook_user().
comment_admin_edit in modules/comment.module
Menu callback; edit a comment from the administrative interface.
contact_mail_user in modules/contact.module
filter_form in modules/filter.module
Generate a selector for choosing a format in a form.
hook_user in developer/hooks/core.php
Act on user account actions.
menu_edit_item_form in modules/menu.module
Present the menu item editing form.
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().
theme_comment_controls in modules/comment.module
theme_comment_form in modules/comment.module
user_edit_form in modules/user.module
user_user in modules/user.module
Implementation of hook_user().
_locale_string_edit in includes/locale.inc
User interface for string editing
_profile_date_field in modules/profile.module
Helper function: output a date selector

Code

includes/common.inc, line 1054

<?php
function form_item($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) {
  return theme('form_element', $title, $value, $description, $id, $required, $error);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.