In #360545: Error with Form Block module a JS hook was provided with which it is possible to modify what happens on form submission of an ajaxified form.
As discussed there it would be great to have a UI for this.
In #360545: Error with Form Block module a JS hook was provided with which it is possible to modify what happens on form submission of an ajaxified form.
As discussed there it would be great to have a UI for this.
Comments
Comment #1
brendoncrawford commentedThis will be done, but you will need to wait a few weeks.
Thanks,
Brendon
Comment #2
paganwinter commentedYou have another 'requestee' :P
Comment #3
brendoncrawford commentedStill working on this. Hang tight.
Comment #4
celstonvml commentedI might be barking up the wrong tree, but is this regarding the "complete" hook for the JavaScript API, as described here?
http://drupal.org/node/349961
Seems like it would be as easy as adding "Drupal.Ajax.invoke" when redirect is NULL
Comment #5
brendoncrawford commentedCelstonbg,
Yes that is what is currently happening in the dev releases (not stable AFAIK). But the original poster is asking about cancelling a redirect even when one has been specified by a module. I am about 80% done with building out this functionality, and it should be up in another couple weeks.
Comment #6
brendoncrawford commentedThis has now been added to 6.x-1.x-dev as a new plugin, "disable_redirect". Please allow up to 12 hours for the new release to update. Also, please read the included README and be sure to give me your feedback if this properly suits your needs.
Thanks,
Brendon
Comment #7
tstoecklerWorks just as described, thank you very much for your persistence.
Comment #9
tayzlor commentedhow do you select these options?
i don't see any option via the user interface on admin/settings/ajax , is it supposed to be there?
or do we have to add extra items to the form via hook_form_alter() ?
i've downloaded the latest dev snapshot by the way.
Comment #10
tstoecklerYou need to disable the "Disable redirect" module, which comes with the AJAX package. Then, if you go to admin/settings/ajax, you can not only select to use AJAX for a form, but also whether you want to disable the redirect.
Comment #11
tayzlor commentedaah, doh, what an idiot!
slight bug with this, drupal_set_message() messages dont get displayed on the screen after submit if the disable_redirect option is enabled on forms. when you then navigate to the next page the drupal message gets displayed.
Comment #12
tayzlor commentedComment #13
tayzlor commentednot sure if this is the right place, but, to add more to this issue, it would also be nice if after form submission it displayed the node 'view' page WITHOUT a redirect in place. would this be something that could be incorporated into this plugin?
is it possible to have another plugin run straight after this one? so i could write my own which fires right after the js function stopping the redirect and removing the content which goes and fetches the node and displays it in place like you are viewing the node again?
Comment #14
brendoncrawford commentedtayzlor,
Could you open 2 new issues for the items you mentioned, then close out this bug?
1) Messages not being displayed if redirect is disabled..
2) Populating a block with node_view if redirect is disabled. (I think this is an excellent idea, by the way)
Comment #15
tayzlor commenteddone,
issues are in -
http://drupal.org/node/391146 and
http://drupal.org/node/391136 respectively.
closing this issue.
Comment #16
doublejosh commentedYup the message works me as well.
Confirming Ajax (w/ disable redirect) + Form Block works like a charm.