You are here

Example: AJAX Graceful Degradation in Examples for Developers 7

These examples show AJAX with graceful degradation when Javascript is not available.

In each of these the key idea is that the form is rebuilt different ways depending on form input. In order to accomplish that, the formbuilder function is in charge of almost all logic.

Parent topics

File

ajax_example/ajax_example_graceful_degradation.inc, line 8
Demonstrations of AJAX with graceful degradation.

Functions

Namesort descending Location Description
ajax_example_add_more ajax_example/ajax_example_graceful_degradation.inc Form with 'add more' and 'remove' buttons.
ajax_example_add_more_add_one ajax_example/ajax_example_graceful_degradation.inc Submit handler for the "add-one-more" button.
ajax_example_add_more_callback ajax_example/ajax_example_graceful_degradation.inc Callback for both ajax-enabled buttons.
ajax_example_add_more_remove_one ajax_example/ajax_example_graceful_degradation.inc Submit handler for the "remove one" button.
ajax_example_add_more_submit ajax_example/ajax_example_graceful_degradation.inc Final submit handler.
ajax_example_dependent_dropdown_degrades ajax_example/ajax_example_graceful_degradation.inc Dropdown form based on previous choices.
ajax_example_dependent_dropdown_degrades_first_callback ajax_example/ajax_example_graceful_degradation.inc Selects just the second dropdown to be returned for re-rendering.
ajax_example_dependent_dropdown_degrades_submit ajax_example/ajax_example_graceful_degradation.inc Submit function for ajax_example_dependent_dropdown_degrades().
ajax_example_dynamic_sections ajax_example/ajax_example_graceful_degradation.inc Dynamically-enabled form with graceful no-JS degradation.
ajax_example_dynamic_sections_select_callback ajax_example/ajax_example_graceful_degradation.inc Callback for the select element.
ajax_example_dynamic_sections_submit ajax_example/ajax_example_graceful_degradation.inc Submit function for ajax_example_dynamic_sections().
ajax_example_dynamic_sections_validate ajax_example/ajax_example_graceful_degradation.inc Validation function for ajax_example_dynamic_sections().
ajax_example_wizard ajax_example/ajax_example_graceful_degradation.inc Wizard form.
ajax_example_wizard_callback ajax_example/ajax_example_graceful_degradation.inc Wizard callback function.
ajax_example_wizard_submit ajax_example/ajax_example_graceful_degradation.inc Submit function for ajax_example_wizard.