The hide_submit module provides a way to hide the submit button in a form after it has been clicked. This will indicate
to the user that his or her request is being processed and helps to prevent duplicate postings from impatient "double clickers".
To achieve this effect a small jQuery snippet is used and is injected to selected (configurable) pages. This script will hide the submit button after it has
been clicked and will replace it with an informative text such as "Please wait..." and/or an animated indicator.
Features
- Hide the submit button after it has been clicked
- Display a message and/or pre-loaded image (ajax-like animation or such) while waiting
- java code can be loaded on selected pages only (like when adding or editing nodes)
- Multi-language message support including RTL
- Advanced help integration
Installation
Installation of hide_submit module is very simple.
Just copy the module to your modules directory and activate it in the admin modules page. It works out of the box using basic default configuration.
There are no module dependencies.
There are no table components.
Configuration
You can access the hide_submit module's configuration page under:
www.example.com/admin/settings/hide-submit.
Display options
- Default message:
here you can set the Default Message message you wish to display.
- Use default image:
Checking this will cause the module to use the default animation that was provided with the module
- Image or animation:
Here you can specify a location of an image to display,
The script will pre-load this image so it will display instantly when submit button is clicked.
- Upload picture:
You can upload an image or gif animation easly using Drupal's familier file upload "widget"
Uploaded files will be saved in a separate folder hide_submit under the site's file directory
And the image or animation field will be updated with the location of the uploaded image
It's easy and you don't even need direct access the file system.
- Localization:
If your site is multi-language you can override the default message for each of your active languages. Under the localization fieldset or
just leave them empty to use the default message
Load options:
- In here you can decide in which pages this script shall be loaded.
Available options are:
'Add/Edit node pages only', 'Every page' or 'Page list'.
by default the script will load when adding or editing nodes /node/add/* and /node/*/edit.
You can choose to load it on every page if you want all of your forms to have this feature or you can specify a list of pages. If you
select the Page list option make sure to add your pages
in the Page list textarea and write each path in separate line.
Resources
- Create a custom animation with the ajaxload.info animation generator
Credits