Using Skinr I'm finding that I need to do different kinds of cleanup depending on whether the dialog form was submitted, or simply closed (or canceled).

Is there a variable in Dialog that's being set to know whether we're submitting a form, or if we're simply closing the dialog?

Comments

miraclestyle’s picture

Not sure if this is what you are looking for:

Inside your ajax handling function where you check if the $output is empty, you can evaluate $form_state for clicked_button:

if (empty($output)) {
      if ($form_state['clicked_button']['#value'] == 'Yes') {
        do something...
      }
      elseif ($form_state['clicked_button']['#value'] == 'No') {
        do something else....
      }
    }

or you could inspect $form_state['executed'] parameter which I believe is set after the form was submitted:

if (empty($output)) {
        if ($form_state['executed']) {
          do something...
        } 

Cheers...

moonray’s picture

Actually, I need too do the evaluation in Dialog UI's onBeforeClose event (or if there's an event that gets triggered before that [perhaps on submit?], I could use that), in the JS, not the in PHP.

entrigan’s picture

any success with this moonray?

devin carlson’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Dialog 6.x is no longer supported.