function rules_action_callback_submit in Rules 6
The configuration form submit callback for an action.
It should be placed into the file MODULENAME.rules_forms.inc or into MODULENAME.rules.inc.
This callback can be implemented to post process the action's configuration form values before they are stored.
Parameters
$settings: The configuration settings to store.
$form: The configuration form.
$form_state: The form's form state.
See also
rules_action_callback_validate(), rules_action_callback_submit()
Related topics
File
- rules/
rules.api.php, line 237 - This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.
Code
function rules_action_callback_submit(&$settings, $form, $form_state) {
$settings['roles'] = array_filter(array_keys(array_filter($settings['roles'])));
}