You are here

function rules_forms_elements_rebuild in Rules Forms Support 7

Submit handler to rebuild form elements.

1 string reference to 'rules_forms_elements_rebuild'
rules_forms_admin_events in includes/rules_forms.admin.inc
Defines the forms events settings form.

File

includes/rules_forms.admin.inc, line 106
Administrative forms for Rules Forms module.

Code

function rules_forms_elements_rebuild($form_id, $form_state) {
  $form_info = rules_forms_get_form_info($form_state['values']['reset_form']);
  $form_info['reset'] = TRUE;
  rules_forms_save_form_info($form_state['values']['reset_form'], $form_info);
  drupal_set_message(t('Please revisit %form so that Rules forms Support can re-evaluate the elements information.', array(
    '%form' => $form_info['label'],
  )));
  if (isset($form_info['path']) && drupal_lookup_path($form_info['path']) !== FALSE) {
    drupal_goto($form_info['path']);
  }
}