This project is not covered by Drupal’s security advisory policy.

Simple form API helper that provide the ability to specify the default submit button to use when the final user press the enter key in his browser.

This is useful when building or using forms with multiple submit buttons.

Note at May 14th, 2011: This module is almost near useless, therefore it goes to abandonned. If anyone wants to maintain it, please ask me.

In order to use it, the only thing a module developer or the site integrator has to do is to specify the "default-submit-action" class on the input button itself, either by modifying the form API function that describe the form, or using the hook_form_alter(). A simple and efficient JavaScript will then do whatever it takes to set the button as the default action for form submission.

The module is only a container for the jQuery based JavaScript script, it provides no API nor fancy function, it works on scratch just by adding the JS in the hook_form_alter() function.

Note that this module lives here because I had to look at different solutions, and I implement the one that looked to be the best one (performances and cross-browser support). Note that in any case of bug, switching to another solution is easy as de-comenting some lines of code in the JS file. Please report any bug or improvements to the issue queue.

Project information

Releases