You are here

function webform_mysql_views_component_submit in Webform MySQL Views 6

Same name and namespace in other branches
  1. 6.2 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
Implementation of hook_form_alter().

File

./webform_mysql_views.module, line 68
The Webform MySQL Views module allows you to automatically build flattened MySQL views of submitted Webform module data, for convenient use by external applications.

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);
}