Posted by populist on August 17, 2012 at 1:17am
6 followers
| Project: | Chaos tool suite (ctools) |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I am a big fan of the full form auto submission, but there are wierd edge cases where you want to exclude a certain form element. It would be nice to have that ability by adding a class to the form.
Comments
#1
Here is a patch to make that happen that excludes checking on the class "ctools-auto-submit-exclude". I also updated the documentation at the top of the .js file to reflect this.
#2
The last submitted patch, 1735254-exclude-form-element-autosubmit_with_docs.patch, failed testing.
#3
Here is a re-roll against the latest dev.
#4
#5
The feature request totally makes sense and it's implement pretty straighforward.
Additional i like the documentation
#6
Committed and pushed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
I am still having this problem with a checkbox that I am adding via hook_form_alter to a views_exposed_form
The solution I have found is:
diff --git a/sites/all/modules/ctools/js/auto-submit.js b/sites/all/modules/ctools/js/auto-submit.jsindex 890dd1f..df69662 100644
--- a/sites/all/modules/ctools/js/auto-submit.js
+++ b/sites/all/modules/ctools/js/auto-submit.js
@@ -49,7 +49,7 @@ Drupal.behaviors.CToolsAutoSubmit = {
.once('ctools-auto-submit')
.change(function (e) {
// don't trigger on text change for full-form
- if ($(e.target).is(':not(:text, :submit)')) {
+ if ($(e.target).is(':not(:text, :submit, .ctools-auto-submit-exclude)')) {
triggerSubmit.call(e.target.form);
}
});