You are here

function rules_forms_event_submit in Rules Forms Support 7

Same name and namespace in other branches
  1. 7.2 rules_forms.module \rules_forms_event_submit()

Submit handler to invoke "form submitted" events.

See also

rules_forms_form_alter()

1 call to rules_forms_event_submit()
RulesFormsAPITestCase::testEventSubmit in ./rules_forms.test
Tests rules_forms_event_submit().
1 string reference to 'rules_forms_event_submit'
rules_forms_form_alter in ./rules_forms.module
Implements hook_form_alter().

File

./rules_forms.module, line 163
Rules Forms Support provides events, conditions, and actions for site forms.

Code

function rules_forms_event_submit(&$form, &$form_state) {
  $entity_type = isset($form_state['entity_type']) ? $form_state['entity_type'] : NULL;
  $entity = isset($entity_type) ? $form_state[$entity_type] : NULL;
  rules_forms_invoke_event('form_submit', $form, $form_state, $entity, $entity_type);
}