You are here

function webform_mysql_views_component_submit in Webform MySQL Views 6.2

Same name and namespace in other branches
  1. 6 webform_mysql_views.module \webform_mysql_views_component_submit()
  2. 7 webform_mysql_views.module \webform_mysql_views_component_submit()

Submit handler for the webform component edit/delete forms.

1 string reference to 'webform_mysql_views_component_submit'
webform_mysql_views_form_alter in ./webform_mysql_views.module
Implements hook_form_alter().

File

./webform_mysql_views.module, line 64
webform_mysql_views.module

Code

function webform_mysql_views_component_submit($form, $form_state) {

  //If this node has a MySQL view, update it.
  switch ($form_state['values']['form_id']) {
    case 'webform_components_form':
    case 'webform_component_edit_form':
      $nid = $form_state['values']['nid'];
      break;
    case 'webform_component_delete_form':
      $nid = $form_state['values']['node']->nid;
      break;
  }
  webform_mysql_views_rebuild($nid);
}