You are here

function web_widgets_plugin_display_web_widgets::options_submit in Web Widgets 7

Same name and namespace in other branches
  1. 6 views/web_widgets_plugin_display_web_widgets.inc \web_widgets_plugin_display_web_widgets::options_submit()

Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.

Overrides views_plugin_display_page::options_submit

File

views/web_widgets_plugin_display_web_widgets.inc, line 160
Implementation of widget display.

Class

web_widgets_plugin_display_web_widgets
The plugin that handles a feed, such as RSS or atom.

Code

function options_submit(&$form, &$form_state) {

  // It is very important to call the parent function here:
  parent::options_submit($form, $form_state);
  switch ($form_state['section']) {
    case 'displays':
      $this
        ->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
      $this
        ->set_option('attach_from', $form_state['view']->current_display);
      break;
    case 'dimension':
      $this
        ->set_option('width', $form_state['values']['width']);
      $this
        ->set_option('height', $form_state['values']['height']);
      break;
    case 'embed_style':
      $this
        ->set_option('embed_style', $form_state['values']['embed_style']);
      break;
    case 'track':
      $this
        ->set_option('track', $form_state['values']['track']);
      break;
  }
}