AHAH/AJAX form validation and submission for Drupal core
Currently there are various contrib modules implementing form validation and/or submission via AJAX/AHAH.
The earliest is Ajax submit. Originally part of the Javascript Tools package, Ajax submit was moved to its own project for Drupal 6. In Drupal 5 Ajax submit combined an API and a UI. For Drupal 6, the UI was (temporarily) removed in order to produce a pure API module that could be used by other module developers free from a UI. At the same time the Javascript was rewritten to use the jQuery forms plugin.
Recently the Ajax forms module was written. Ajax forms provides functionality similar to that of the D5 Ajax submit and an API similar to that of the D6 Ajax submit.
AJAX form submission has also been implemented in the Popups module and recently in the Asyncrhonous module.
Besides this, many modules implement one or another custom approach to AJAX form submission, e.g., Views.
The proliferation of contrib implementations of AJAX/AHAH form validation and submission suggests two needs:
-
Standardization on a common API to be jointly developed and maintained.
-
Consideration of introducing AJAX/AHAH form validation and submission to Drupal core.
This post is an invitation to discussion of these topics.
Is there interest in working up a core patch introducing AJAX form validation and submission? If so, what are our best starting places? What is our best approach for D6?
(I recently posted an enabling issue that might help remove an obstacle to AJAX submission in core: http://drupal.org/node/357336.)

Form Builder's Validation
Form Builder has built-in AJAX validation (along with the element preview). If you haven't seen it there's a demo at linked at the project page http://drupal.org/project/form_builder.
However the entire validation system is about 10 lines (if even) so I'm not sure it would be worthwhile forming any dependencies for it.
What's the goal for such AJAX validation? Just to alert the user of errors before they submit the page? If we get a validation error, where do we put it once we have them?
Validation goes with submission
I'm thinking of validation not as a stand alone component but as part of a solution set. For AJAX form submission, I guess we will usually need at a minimum the following:
Because these components will be needed for most or all AJAX form submission, I think they're what we should abstract into an API, probably for core.
I don't mean that a generic API needs to do all of the specific things in the last two points--just that it should be flexible enough to enable them.
This needn't be a lot of code. For instance the ajaxsubmit.js file covers most of these client tasks in under 90 lines.
I think this is great, has
I think this is great, has there been any progress?
Frank Carey
TwelveGrove Drupal Development
http://www.twelvegrove.com
Implemented in this module
Implemented in this module as well...
http://drupal.org/project/outline_designer
Keep up the great work ajax guys, I've been wondering for the last year now why no one had been able to figure this out :)
"Plaguing the world with Drupal; One Plone, Moodle, Wordpress, Joomla user at a time since 2005." ~ btopro
http://elearning.psu.edu/
http://elearning.psu.edu/projects/
http://elearning.psu.edu/drupalineducation/
Username validity check in core?
This module's functionality is something i personally think should be in core, but the issue probably needs solving in a more general way. I'm really in favor of the ability to do per field validation like what's going on here.
http://drupal.org/project/username_check
Frank Carey
TwelveGrove Drupal Development
http://www.twelvegrove.com