Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello, I've a page with a link who open a form via jQuery UI Dialog, this page has a simple form with a plupload element. When I click on submit it send all data via ajax and all works ok, but if I add 'autosubmit' => TRUE to form, it reload the entire page and not call the right ajax callback. How can I perform this operation ?
thanks
Comment | File | Size | Author |
---|---|---|---|
#4 | plupload-autosubmit-without-autoupload-2127967-3.patch | 1.82 KB | joelstein |
Comments
Comment #1
csedax90 CreditAttribution: csedax90 commentedComment #2
slashrsm CreditAttribution: slashrsm commentedHave you tried to also set #submit_element?
Comment #3
joelstein CreditAttribution: joelstein as a volunteer commentedI had this same issue. I want to not auto-upload (so that users could continue building their list of files) but I do want to auto-submit a button after uploading.
In my use case, I have an ajax button that I want to click after clicking the "Start upload" link in the Plupload widget.
However, it seems that the
#autosubmit
setting only applies if the#autoupload
setting is enabled.I don't think that should be the case. I see times where you'd want to automatically perform some action after uploading, even if not auto-uploading.
Here's a patch which lets you use
#autosubmit
with#submit_element
. Here's an example of how this could be used:It hides the ajax button, but then Plupload's JS will click it automatically after uploading all the files. Works like a charm!
Comment #4
joelstein CreditAttribution: joelstein as a volunteer commentedOops, here's the patch.