Closed (fixed)
Project:
Modal Frame API
Version:
6.x-1.7
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2010 at 17:56 UTC
Updated:
28 Nov 2013 at 19:50 UTC
Jump to comment: Most recent
Comments
Comment #1
markus_petrux commentedHave you tried attaching your submit callback to $form['buttons']['submit']['#submit'] ? If that does not work, then there may be some other module doing something here...
I know it works. The Node Relationships module uses it with no troubles (browse its code and search for "noderelationships_child_node_form_submit").
Comment #2
zeip commentedYes, that indeed did work, as I also found out last night. It seems that this is not done automagically; perhaps it should (for example in the child_js function), or at least documented, if it isn't yet (I didn't find it.)
Comment #3
markus_petrux commentedI have not documented this because it's a particular case with the node form. Modal Frame method works. The problem is that the node module breaks the normal form processing flow. From my POV, this is one of those things that one should find by itself when using this API. It's not a feature of the API itself. Related, but not part of.
I wrote a page inthe handbooks for this API, and it can be found here:
http://drupal.org/node/700752
That's a page that can be edited by anyone, or maybe child pages can be created to enhance the basic documentation with this kind of experiences.
Comment #4
james.williamsIn your custom submission handler that calls modalframe_close_dialog(), you might want to also have: $form_state['redirect'] = FALSE;
It didn't work for me without that.
Comment #5
SebCorbin commenteduse $form['#redirect'] to redirect to page after submit
Comment #6
colorado commentedI was having this problem too, and figured out this:
http://drupal.org/project/save_edit module also causes this problem, when any of the buttons are displayed on the node form and the node form is displayed in the modal window.
Comment #7
gaëlgFor me it only worked in these conditions:
$form['buttons']['submit']['#submit'][] = 'my_closing_submit')Comment #8
dsnopekLots of good solutions to this problem given here. Closing.