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.

Files: 
CommentFileSizeAuthor
#3 1735254-exclude-form-element-autosubmit_with_docs_0.patch1.53 KBpopulist
PASSED: [[SimpleTest]]: [MySQL] 60 pass(es).
[ View ]
#1 1735254-exclude-form-element-autosubmit_with_docs.patch1.59 KBpopulist
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1735254-exclude-form-element-autosubmit_with_docs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.59 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1735254-exclude-form-element-autosubmit_with_docs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

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.

Status:Needs review» Needs work

The last submitted patch, 1735254-exclude-form-element-autosubmit_with_docs.patch, failed testing.

StatusFileSize
new1.53 KB
PASSED: [[SimpleTest]]: [MySQL] 60 pass(es).
[ View ]

Here is a re-roll against the latest dev.

Status:Needs work» Needs review

Status:Needs review» Reviewed & tested by the community

The feature request totally makes sense and it's implement pretty straighforward.

Additional i like the documentation

Status:Reviewed & tested by the community» Fixed

Committed and pushed.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

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.js
index 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);
         }
       });