You are here

function modalframe_example_form_submit in Modal Frame API 6

Same name and namespace in other branches
  1. 7 modules/modalframe_example/modalframe_example.module \modalframe_example_form_submit()

Submit handler for our node edit form example.

This function is part of the node edit form example.

See also

modalframe_example_node_edit_page()

modalframe_example_form_alter()

1 string reference to 'modalframe_example_form_submit'
modalframe_example_form_alter in modules/modalframe_example/modalframe_example.module
Implementation of hook_form_alter().

File

modules/modalframe_example/modalframe_example.module, line 232
Example for the Modal Frame module.

Code

function modalframe_example_form_submit($form, &$form_state) {

  // Ignore preview requests. Close dialog only when user clicks "Save" button.
  if ($form_state['values']['op'] == t('Save')) {

    // Tell the parent window to close the modal frame dialog.
    modalframe_close_dialog(array(
      'message' => t('This is an argument sent by the Modal Frame API from the submit handler attached to the node edit form!'),
    ));
  }
}