drupal_build_form

  1. views
    1. 6.2
    2. 6.3
  2. drupal
    1. 8 form.inc
    2. 7 form.inc
Versions
6.2 – 8 drupal_build_form($form_id, &$form_state)

Views' replacement for drupal_get_form so that we can do more with less.

Items that can be set on the form_state include:

  • input: The source of input. If unset this will be $_POST.
  • no_redirect: Absolutely do not redirect the form even if instructed to do so.
  • rerender: If no_redirect is set and the form was successfully submitted, rerender the form. Otherwise it will just return.

▾ 9 functions call drupal_build_form()

template_preprocess_views_ui_edit_tab in includes/admin.inc
template_preprocess_views_ui_edit_view in includes/admin.inc
Preprocess the view edit page.
template_preprocess_views_ui_list_views in includes/admin.inc
Preprocess the list views theme
views_ajax_form_wrapper in includes/ajax.inc
Wrapper around drupal_build_form to handle some AJAX stuff automatically. This makes some assumptions about the client.
views_export_export in views_export/views_export.module
Page callback to export views in bulk.
views_plugin_exposed_form::render_exposed_form in plugins/views_plugin_exposed_form.inc
Render the exposed filter form.
views_ui_add_page in includes/admin.inc
Page callback to add a new view.
views_ui_clone_page in includes/admin.inc
Page callback to add a new view.
views_ui_preview in includes/admin.inc
Page callback for the live preview.

Code

./views.module, line 1546

<?php
function drupal_build_form($form_id, &$form_state) {
  views_include('form');
  return _drupal_build_form($form_id, $form_state);
}
?>