drupal_get_form

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_get_form($form_id)

Wrapper for drupal_build_form() for use when $form_state is not needed.

see drupal_build_form()

Übergabeparameter

$form_id The unique string identifying the desired form. If a function with that name exists, it is called to build the form array. Modules that need to generate the same form (or very similar forms) using different $form_ids can implement hook_forms(), which maps different $form_id values to the proper form constructor function. Examples may be found in node_forms(), search_forms(), and user_forms().

... Any additional arguments are passed on to the functions called by drupal_get_form(), including the unique form constructor function. For example, the node_edit form requires that a node object is passed in here when it is called.

Rückgabewert

The form array.

Verwandte Themen

▾ 46 functions call drupal_get_form()

block_admin_display in modules/block/block.admin.inc
Menu callback for admin/build/block.
book_outline in modules/book/book.pages.inc
Menu callback; show the outline form for a single node.
comment_admin in modules/comment/comment.admin.inc
Menu callback; present an administrative comment listing.
comment_delete in modules/comment/comment.admin.inc
Menu callback; delete a comment.
contact_personal_page in modules/contact/contact.pages.inc
Personal contact page.
contact_site_page in modules/contact/contact.pages.inc
Site-wide contact page.
dblog_overview in modules/dblog/dblog.admin.inc
Menu callback; displays a listing of log messages.
field_test_entity_add in modules/simpletest/tests/field_test.module
field_test_entity_edit in modules/simpletest/tests/field_test.module
filter_admin_configure_page in modules/filter/filter.admin.inc
Menu callback; display settings defined by a format's filters.
filter_admin_format_page in modules/filter/filter.admin.inc
Menu callback; Display a text format form.
filter_admin_order_page in modules/filter/filter.admin.inc
Menu callback; display form for ordering filters for a format.
form_test_form_clean_id_page in modules/simpletest/tests/form_test.module
Generate a page with three forms, to test the clean_id generation.
forum_form_main in modules/forum/forum.admin.inc
install_change_settings in ./install.php
Configure and rewrite settings.php.
install_select_locale in ./install.php
Allow admin to select which locale to use for the current profile.
install_select_profile in ./install.php
Allow admin to select which profile to install.
install_tasks in ./install.php
Tasks performed after the database is initialized.
locale_languages_add_screen in includes/locale.inc
User interface for the language addition screen.
locale_translate_delete_page in includes/locale.inc
String deletion confirmation page.
locale_translate_export_screen in includes/locale.inc
User interface for the translation export screen.
locale_translate_seek_screen in includes/locale.inc
String search screen.
menu_delete_menu_page in modules/menu/menu.admin.inc
Menu callback; check access and get a confirm form for deletion of a custom menu.
menu_item_delete_page in modules/menu/menu.admin.inc
Menu callback; Check access and present a confirm form for deleting a menu link.
node_add in modules/node/node.pages.inc
Present a node submission form or a set of links to such forms.
node_page_edit in modules/node/node.pages.inc
Menu callback; presents the node editing form, or redirects to delete confirmation.
openid_redirect in modules/openid/openid.inc
Creates a js auto-submit redirect for (for the 2.x protocol)
openid_user_identities in modules/openid/openid.pages.inc
Menu callback; Manage OpenID identities for the specified user.
path_admin_edit in modules/path/path.admin.inc
Menu callback; handles pages for creating and editing URL aliases.
path_admin_overview in modules/path/path.admin.inc
Return a listing of all defined URL aliases. When filter key passed, perform a standard search on the given key, and return the list of matching URL aliases.
poll_view in modules/poll/poll.module
Implementation of hook_view().
search_block_view in modules/search/search.module
Implementation of hook_block_view().
search_view in modules/search/search.pages.inc
Menu callback; presents the search form and/or search results.
system_actions_manage in modules/system/system.module
Menu callback. Display an overview of available and configured actions.
system_ip_blocking in modules/system/system.admin.inc
Menu callback. Display blocked IP addresses.
taxonomy_term_edit in modules/taxonomy/taxonomy.pages.inc
Page to edit a vocabulary term.
template_preprocess_page in includes/theme.inc
Process variables for page.tpl.php
template_preprocess_poll_results in modules/poll/poll.module
Preprocess the poll_results theme hook.
theme_comment_form_box in modules/comment/comment.module
Theme the comment form box.
trigger_assign in modules/trigger/trigger.admin.inc
Build the form that allows users to assign actions to hooks.
update_selection_page in ./update.php
user_admin in modules/user/user.admin.inc
user_block_view in modules/user/user.module
Implementation of hook_block_view().
user_edit in modules/user/user.pages.inc
Form builder; Present the form to edit a given user or profile category.
user_external_login in modules/user/user.module
Perform standard Drupal login operations for a user object.
user_page in modules/user/user.pages.inc
Access callback for path /user.

Code

includes/form.inc, line 69

<?php
function drupal_get_form($form_id) {
  $form_state = array();

  $args = func_get_args();
  // Remove $form_id from the arguments.
  array_shift($args);
  $form_state['args'] = $args;

  return drupal_build_form($form_id, $form_state);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen