AJAX Form Messages, a proposed module
Update: See the module page, http://drupal.org/project/formmsgs
and http://definitivedrupal.org/node/128 for the making of (in progress).
This module was requested by uberbytes, originally to make a proper module of the code attached to this post: Check for duplicate titles of a node with AJAX to warn immediately before entering more data or submitting.
It will also address this long-held need of Agaric's Prevent duplicate link submission when using CCK Link module with AJAX alerts.
Prior art
- http://drupal.org/project/ajax
and/or here: http://groups.drupal.org/ajaxmodule
There's also AJAX register, but it is on the same idea and indeed depends on AJAX module. - The AJAX module by default runs only when submit is pressed, and puts error messages on the top. This is a very small usability win, in my opinion, and it loses the browser memory of "i submitted this form".
- http://drupal.org/project/ahah_helper - "validation is only performed when a button is pressed, not when an AHAH event fires"
- http://drupal.org/project/ife - puts the warning messages on the form elements instead of at the top of the form, but is not AJAX.
- http://www.lullabot.com/articles/module-monday-maxlength-js - a specific example
Some integration with CTools that doesn't go anywhere, but a reminder to look at CTools' implementation:
http://drupal.org/node/478444
Oh here we go, the motherload, and it needs documentation:
Integrate CTools AJAX framework with Drupal to extend (and replace) existing ahah framework
http://drupal.org/node/544418
See also Standardize the return of status messages in AJAX callbacks.
Older discussion of AJAX for forms for Drupal core:
http://groups.drupal.org/node/18170
One of the best-of-breed in contrib: http://drupal.org/project/username_check
Ad hoc solutions:
http://www.drupalconnect.com/blog/jwhitener/drupal-ajax-form-validation
http://stellapower.net/content/ajax-ifying-drupal-node-forms
Nedjo commenting on Starbow's Popups API, mentions he'd like everything forms-related in one module:
http://groups.drupal.org/node/8452#comment-25982
In the meantime he's said that Drupal 7 contains most of that module, http://drupal.org/project/ajaxsubmit so it won't be ported, and the rest can be found in http://drupal.org/project/ctools
An issue on (the non-AJAX, D6) Inline Form Errors requests (optionally) place messages between form label and form element, which seems a good idea to try to allow.
Comments
Post new comment