Hello!
As the title says I discovered that when having two forms on the same page the ajax auto submit dosen't work. Looked at the file draggableviews_table.js and saw that it looked for the id #edit-actions, on my it was #edit-actions--2. It also look for a input field but I use the button element.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | multiple_forms_on_page_not_working-1989128-13.patch | 1.92 KB | istryker |
| Screen Shot 2013-05-07 at 16.41.05.png | 17.38 KB | StoraH |
Comments
Comment #1
StoraH commentedHere is the patch :)
Comment #2
StoraH commentedUpdated patch. Just saw it was the same issue with hide the submit button.
Comment #3
mvcsimilar problem with ajax & lists, patch attached. i didn't actually test the other patch because i'm not using a table view so i didn't merge these two into one patch, but i'm posting here in case it's helpful for someone.
in my case this broke when i enabled the masquerade module, which adds its own submit button to the page.
Comment #4
rj commentedOK I just spent the last couple of hours trying to track this down and found this ticket. Here's what happens:
It would be nice if this issue was fixed. The attached patch combines the above two patches with a minor change to StoraH's patch.
Comment #4.0
rj commentedtypo.
Comment #5
nicolas bouteille commentedThis module is awesome and this patch made my day! RTBC!! Please commit :)
Comment #6
istryker commentedJust to confirm, Patch #4 should be added? Patch #2 solves this using a different command. So scrap #2 and go with #4?
Comment #7
StoraH commentedHmm.. I'm not sure. If we only want to fix the issue with multiple forms on one page, patch #4 should do it. But that will only support input element as submit which is not so good.
Comment #8
istryker commentedwhat other things should be support
Comment #9
StoraH commentedAs mentioned in the issue description, the button element. We should select the submit with a class so we are not bound to that html element.
Or did you mean other than that?
Comment #10
istryker commentedWhat I picture is the class on the submit button not be a submit--number, rather, class_with_view_name-submit. Then you do not have to do a find the closet submit button, you can do find THIS submit button matches my name.
Comment #11
StoraH commentedI agree, something in that direction sounds good.
Comment #12
istryker commentedMarking as needs work in favor of a solution that is class_with_view_name-submit vs submit--number.
Comment #13
istryker commentedPatch to class to submit and action ids
However, after reviewing the code, I do not think we need this. Created a new issue for this. #2415081: Unique id for edit-action and edit-submit
Attached is modified patch that fix multiple forms for list and tables. Note: At this time multiple list are still broken. See #1957656: Multiple draggableviews list on same page not working
Comment #15
istryker commentedCommitted marking as fixed