This module allows you to use Ctrl+S or Cmd+S to save your forms.
The module deals with the following issues:
- Choosing the correct button to execute the click on.
- Capturing focus on the form and executing the button on the focused form.
- Capturing the Enter key on text fields and submitting the relevant button rather than just submitting the form without a button.
It is important that the button is clicked rather than just submitting the form as this ensures the 'triggered_element' variable is set correctly and the correct submit code is executed where multiple buttons are used.
To install simply enable the module.
To set a button as the default button, add '#default_button' => TRUE to your button declaration in the form.
$form['my_button'] = array( '#type' => 'submit', '#value' => t('My Button'), '#default_button' => TRUE, );
A massive thank you must go to johnv who helped to test this module thoroughly!
- Maintenance status: Seeking co-maintainer(s)
- Development status: Maintenance fixes only
- Module categories: Administration, Content, Utility
- Reported installs: 218 sites currently report using this module. View usage statistics.
- Downloads: 2,284
- Last modified: December 2, 2014
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.