form

Versions
4.6
form($form, $method = 'post', $action = NULL, $attributes = NULL)

Generate a form from a set of form elements.

@result An HTML string with the contents of $form wrapped in a form tag.

Parameters

$form An HTML string containing one or more form elements.

$method The query method to use ("post" or "get").

$action The URL to send the form contents to, if not the current page.

$attributes An associative array of attributes to add to the form tag.

Related topics

▾ 55 functions call form()

aggregator_form_category in modules/aggregator.module
aggregator_form_feed in modules/aggregator.module
archive_page in modules/archive.module
Menu callback; lists all nodes posted on a given date.
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
block_admin_display in modules/block.module
Prepare the main block administration form.
block_box_add in modules/block.module
Menu callback; displays the block creation form.
book_admin_view in modules/book.module
Display an administrative view of the hierarchy of a book.
book_outline in modules/book.module
Implementation of function book_outline() Handles all book outline operations.
comment_admin_edit in modules/comment.module
Menu callback; edit a comment from the administrative interface.
comment_matrix_settings in modules/comment.module
Menu callback; presents the moderation vote matrix.
comment_role_settings in modules/comment.module
Menu callback; allows admin to set default scores for different roles.
comment_threshold_settings in modules/comment.module
Menu callback; displays settings for thresholds at which comments are displayed.
comment_vote_settings in modules/comment.module
Menu callback; displays page for assigning names to vote values.
contact_mail_user in modules/contact.module
filter_admin_filters in modules/filter.module
Menu callback; configure the filters for a format.
filter_admin_order in modules/filter.module
Menu callback; display form for ordering filters for a format.
filter_admin_overview in modules/filter.module
Menu callback; allows administrators to set up input formats.
forum_form_container in modules/forum.module
Returns a form for adding a container to the forum vocabulary
forum_form_forum in modules/forum.module
Returns a form for adding a forum to the forum vocabulary
menu_edit_item_form in modules/menu.module
Present the menu item editing form.
node_admin_nodes in modules/node.module
Generate the content administration overview.
node_form in modules/node.module
Generate the node editing form.
path_form in modules/path.module
Return a form for editing or creating an individual URL alias.
poll_view_voting in modules/poll.module
Generates the voting form for a poll.
queue_view in modules/queue.module
Display a queued node along with voting options for it.
search_form in modules/search.module
Render a search form.
system_modules in modules/system.module
Menu callback; displays a listing of all modules.
system_settings_form in modules/system.module
system_themes in modules/system.module
Menu callback; displays a listing of all themes.
system_theme_settings in modules/system.module
Menu callback; display theme configuration for entire site and individual themes.
taxonomy_form_term in modules/taxonomy.module
taxonomy_form_vocabulary in modules/taxonomy.module
theme_comment_form in modules/comment.module
theme_confirm in includes/theme.inc
Output a confirmation form
update_page in ./update.php
user_admin_access_add in modules/user.module
Menu callback: add an access rule
user_admin_access_check in modules/user.module
Menu callback: check an access rule
user_admin_access_edit in modules/user.module
Menu callback: edit an access rule
user_admin_create in modules/user.module
user_admin_perm in modules/user.module
Menu callback: administer permissions.
user_admin_role in modules/user.module
Menu callback: administer roles.
user_block in modules/user.module
Implementation of hook_block().
user_edit in modules/user.module
user_login in modules/user.module
user_pass in modules/user.module
user_register in modules/user.module
watchdog_overview in modules/watchdog.module
Menu callback; displays a listing of log messages.
_aggregator_page_list in modules/aggregator.module
Prints an aggregator page listing a number of feed items. Various menu callbacks use this function to print their feeds.
_locale_admin_export_screen in includes/locale.inc
User interface for the translation export screen
_locale_admin_import_screen in includes/locale.inc
User interface for the translation import screen
_locale_admin_manage_add_screen in includes/locale.inc
User interface for the language addition screen
_locale_admin_manage_screen in includes/locale.inc
User interface for the language management screen
_locale_string_edit in includes/locale.inc
User interface for string editing
_locale_string_seek_form in includes/locale.inc
User interface for the string search screen
_profile_field_form in modules/profile.module

Code

includes/common.inc, line 999

<?php
function form($form, $method = 'post', $action = NULL, $attributes = NULL) {
  if (!$action) {
    $action = request_uri();
  }
  return '<form action="'. check_url($action) .'" method="'. $method .'"'. drupal_attributes($attributes) .">\n". $form . form_token() ."\n</form>\n";
}
?>
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.