You are here

function rules_forms_save_form_info in Rules Forms Support 7

Saves form information.

Parameters

string $form_id: The form ID of the form whose information is being saved.

mixed $form_info: The form information to store.

bool $rebuild_cache: A boolean value indicating whether the Rules cache should be reset upon saving. This defaults to TRUE.

4 calls to rules_forms_save_form_info()
RulesFormsAPITestCase::testSaveFormInfo in ./rules_forms.test
Tests rules_forms_save_form_info().
rules_forms_activate_form in ./rules_forms.module
Activate events for a form.
rules_forms_after_build in ./rules_forms.module
Add element IDs on the form if the setting is enabled.
rules_forms_elements_rebuild in includes/rules_forms.admin.inc
Submit handler to rebuild form elements.

File

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

Code

function rules_forms_save_form_info($form_id, $form_info, $rebuild_cache = TRUE) {
  $event_info = variable_get('rules_forms_form_info', array());
  $event_info[$form_id] = $form_info;
  variable_set('rules_forms_form_info', $event_info);
  if ($rebuild_cache) {
    rules_clear_cache();
  }
}