function flexslider_views_plugin_style_flexslider::options_form in Flex Slider 7.2
Same name and namespace in other branches
- 7 flexslider_views/flexslider_views_plugin_style_flexslider.inc \flexslider_views_plugin_style_flexslider::options_form()
Show a form to edit the style options.
Overrides views_plugin_style::options_form
File
- flexslider_views/
flexslider_views_plugin_style_flexslider.inc, line 29 - flexslider style plugin for the Views module.
Class
- flexslider_views_plugin_style_flexslider
- Implements a style type plugin for the Views module.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['flexslider'] = array(
'#type' => 'fieldset',
'#title' => t('FlexSlider'),
);
$optionsets = array();
foreach (flexslider_optionset_load_all() as $name => $optionset) {
$optionsets[$name] = check_plain($optionset->title);
}
$form['flexslider']['optionset'] = array(
'#title' => t('Option set'),
'#type' => 'select',
'#options' => $optionsets,
'#default_value' => $this->options['optionset'],
);
$link_options = array(
'' => t('None'),
);
foreach ($this->view->display_handler
->get_handlers('field') as $field => $handler) {
$link_options[$field] = $handler
->ui_name();
}
$captionfield_options = array(
'' => t('None'),
);
foreach ($this->view->display_handler
->get_handlers('field') as $field => $handler) {
$captionfield_options[$field] = $handler
->ui_name();
}
$form['flexslider']['captionfield'] = array(
'#type' => 'select',
'#title' => t('Caption Field'),
'#description' => t("Select a field to be used as the caption. This can also be set manually by adding the '.flex-caption' class to a field. Required to use thumbnail captions."),
'#options' => $captionfield_options,
'#default_value' => $this->options['captionfield'],
);
$form['flexslider']['id'] = array(
'#type' => 'textfield',
'#title' => t('Element ID'),
'#description' => t("Manually define the FlexSlider container ID attribute <em>Ensure you don't display similar ID elements on the same page</em>."),
'#size' => 40,
'#maxlength' => 255,
'#default_value' => $this->options['id'],
);
}