Full ELMS Learning Network documentation
function drupal_get_form
Error message
User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).cis7 form.inc | drupal_get_form($form_id) |
cle7 form.inc | drupal_get_form($form_id) |
elmsmedia7 form.inc | drupal_get_form($form_id) |
icor7 form.inc | drupal_get_form($form_id) |
meedjum_blog7 form.inc | drupal_get_form($form_id) |
mooc7 form.inc | drupal_get_form($form_id) |
Returns a renderable form array for a given form ID.
This function should be used instead of drupal_build_form() when $form_state is not needed (i.e., when initially rendering the form) and is often used as a menu callback.
Parameters
$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(), and search_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. These are available to implementations of hook_form_alter() and hook_form_FORM_ID_alter() as the array $form_state['build_info']['args'].
Return value
The form array.
See also
Related topics
- accessibility_admin_existing_tests in sites/
all/ modules/ ulmus/ accessibility/ accessibility.admin.inc - List existing accessibility tests. @todo - add a filter form
- accessibility_test_add in sites/
all/ modules/ ulmus/ accessibility/ accessibility.module - New accessibility test form.
- adaptivetheme_preprocess_page in sites/
all/ themes/ ulmus/ adaptivetheme/ at_core/ inc/ preprocess.inc - Preprocess variables for page.tpl.php
- advanced_help_index_page in sites/
all/ modules/ ulmus/ advanced_help/ advanced_help.module - Page callback to view the advanced help topic index.
- advanced_help_search_view in sites/
all/ modules/ ulmus/ advanced_help/ advanced_help.module - Page callback for advanced help search.
- accessibility_content_menu in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_content/ accessibility_content.module - Implements hook_menu().
- accessibility_menu in sites/
all/ modules/ ulmus/ accessibility/ accessibility.module - Implements hook_menu().
- accessibility_testswarm_menu in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_testswarm/ accessibility_testswarm.module - Implements hook_menu();
- admin_menu_menu in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu.module - Implements hook_menu().
- advagg_bundler_menu in sites/
all/ modules/ ulmus/ advagg/ advagg_bundler/ advagg_bundler.module - Implements hook_menu().
File
- includes/
form.inc, line 123 - Functions for form and batch generation and processing.
Code
function drupal_get_form($form_id) {
$form_state = array();
$args = func_get_args();
// Remove $form_id from the arguments.
array_shift($args);
$form_state['build_info']['args'] = $args;
return drupal_build_form($form_id, $form_state);
}