function ajax_forms_test_lazy_load_form

Form builder: Builds a form that triggers a simple AJAX callback.

4 string references to 'ajax_forms_test_lazy_load_form'
ajax_forms_test_menu in drupal/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
Implements hook_menu().
FrameworkTest::testLazyLoad in drupal/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
Tests that new JavaScript and CSS files are lazy-loaded on an AJAX request.
FrameworkTest::testLazyLoadOverriddenCSS in drupal/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
Tests that overridden CSS files are not added during lazy load.
FrameworkTest::testOrder in drupal/core/modules/system/lib/Drupal/system/Tests/Ajax/FrameworkTest.php
Tests AjaxResponse::prepare() AJAX commands ordering.

File

drupal/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module, line 520
Simpletest mock module for Ajax forms testing.

Code

function ajax_forms_test_lazy_load_form($form, &$form_state) {
  $form['add_files'] = array(
    '#type' => 'checkbox',
    '#default_value' => FALSE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
    '#ajax' => array(
      'wrapper' => 'ajax-forms-test-lazy-load-ajax-wrapper',
      'callback' => 'ajax_forms_test_lazy_load_form_ajax',
    ),
    '#prefix' => '<div id="ajax-forms-test-lazy-load-ajax-wrapper"></div>',
  );
  return $form;
}