function modalframe_example_simple_form_submit in Modal Frame API 7
Same name and namespace in other branches
- 6 modules/modalframe_example/modalframe_example.module \modalframe_example_simple_form_submit()
Submit handler for the child form.
File
- modules/modalframe_example/ modalframe_example.module, line 149 
- Example for the Modal Frame module.
Code
function modalframe_example_simple_form_submit($form, &$form_state) {
  // Process the form as usual.
  drupal_set_message(t('The form has been processed.'));
  // Tell the parent window to close the modal frame dialog.
  modalframe_close_dialog(array(
    'message' => empty($form_state['values']['is_after_12']) ? t('Good morning!') : t('Good afternoon!'),
  ));
}