ajax_example.module

Version 1.16 (checked in on 2011/02/21 at 05:55:54 by katbailey)

AJAX Examples module file with basic examples.

Functions & methods

NameDescription
ajax_example_autocheckboxesAJAX-enabled select element causes replacement of a set of checkboxes based on the selection.
ajax_example_autocheckboxes_callbackCallback element needs only select the portion of the form to be updated. Since #ajax['callback'] return can be HTML or a renderable array (or an array of commands), we can just return a piece of the form. See @link ajax_example_advanced.inc…
ajax_example_autotextfieldsShow/hide textfields based on AJAX-enabled checkbox clicks.
ajax_example_autotextfields_callbackSelects the piece of the form we want to use as replacement text and returns it as a form (renderable array).
ajax_example_dependent_dropdownA form with a dropdown whose options are dependent on a choice made in a previous dropdown.
ajax_example_dependent_dropdown_callbackSelects just the second dropdown to be returned for re-rendering
ajax_example_intro
ajax_example_menuSet up calls to drupal_get_form() for all our example cases.
ajax_example_simplestSimple form whose ajax-enabled 'changethis' member causes a text change in the description of the 'replace_textfield' member. See Form API Tutorial
ajax_example_simplest_callbackCallback for ajax_example_simplest.
ajax_example_submit_driven_ajaxA very basic form which with an AJAX-enabled submit.
ajax_example_submit_driven_callbackSelect the 'box' element, change the markup in it, and return it as a renderable array.
_ajax_example_get_first_dropdown_optionsHelper function to populate the first dropdown. This would normally be pulling data from the database.
_ajax_example_get_second_dropdown_optionsHelper function to populate the second dropdown. This would normally be pulling data from the database.