I have an ajax modal form appearing quite nicely, defined in mymodule.form, and I do the obligatory setting of state
$form_state = array(
'ajax' => TRUE,
'title' => t('blah'),
);

and I have a normal #type=submit button. When I click it, I end up back at the display of the form, having not gotten to the redirect part yet, but mymodule.form.submit(&$form,&$form_state) never gets hit.

Comments

j. ayen green’s picture

What's (more) odd is that the display of the form is triggered by clicking a link with mymodule/nojs/go as the href, and that callback does the modal window and form, that callback is where it goes (again) when the form submit button is clicked rather than the form submit function.

j. ayen green’s picture

Status: Active » Closed (works as designed)

Ah, I had inadvertently interrupted the flow by sending output back to the form from the callback as a message, but in doing so had interrupted the flow just before control would have been transferred to the submit function. xDebug reveals all!