Closed (fixed)
Project:
Automodal
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2010 at 20:36 UTC
Updated:
14 Nov 2013 at 12:19 UTC
Jump to comment: Most recent
Comments
Comment #1
rc2020 commentedanyone?
Comment #2
rc2020 commentedanyone, anything?
Comment #3
rc2020 commentedFYI - I put a detailed support request in the modal frame API's issue queue: http://drupal.org/node/757686 The test of it is as follows:
I use modal frame API with automodal, and I'm trying for the life of me to redirect to the submitted node AFTER modalframe_close_dialoug(); is envoked. Now, if I try to initiate the redirect, it redirects to the submitted node however it redirects within the modal window.
I can get the redirect to happen a couple of ways. The first is by hacking the modalframe.module - line 204:
This forces the redirect, but it happens within the modal. I'm not sure where/how to call modalframe_close_dialog() before the $form_state['redirect'].
The other way is by adding the function within automodal, which is essentially just a helper module to load the modal frame window with drupals forms api.
Trying to call the $form_state redirect outside of this function is still possible in automodal's invocation for hook_form_alter(), but again, the redirect will happen in the modal, not after the modal has closed.
Lastly, it is possible to initiate the redirect through rules.module, but, again, the redirect only happens within the modal - not after it has closed.
Even if I set a rules action to 'execute custom php code' and add in modalframe_close_dialog(), the redirect still happens in the modal window.
I've been banging my head against this for a while, is there anything anyone can suggest to achieve this? The usability of modal frames to add node forms is severely diminished if the user can't be redirected to what they submitted.
Thanks!
Comment #4
mfer commentedThere is now a property to use with automodal_add called automodalRedirect. See the docblock for that function. It can be a location you want to redirect to. If you need to alter that hook_automodal_close_args_alter provides that.
Comment #6
broncomania commentedI run into the me problem. Can we get an example of how to use it? I try several things but I can't get it work to redirect after my form was submitted. I think hook_automodal_close_args_alter is not called but I am not sure if I use it correct. I think the automodal_add function is somehow broken.
Comment #7
broncomania commentedComment #8
gejo commentedSimply add automodalReload=true as a parameter in the URL for the links:
You could do that with jquery:
Comment #9
dsnopekWorks as designed per comment #4.