function entityreference_plugin_style::options_form in Entity reference 7
Provide a form to edit options for this plugin.
Overrides views_plugin_style::options_form
File
- views/
entityreference_plugin_style.inc, line 17 - Handler for entityreference_plugin_style.
Class
- entityreference_plugin_style
- @file Handler for entityreference_plugin_style.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$options = array();
if (isset($form['grouping'])) {
$options = $form['grouping'][0]['field']['#options'];
unset($options['']);
$form['search_fields'] = array(
'#type' => 'checkboxes',
'#title' => t('Search fields'),
'#options' => $options,
'#required' => TRUE,
'#default_value' => isset($this->options['search_fields']) ? $this->options['search_fields'] : array(),
'#description' => t('Select the field(s) that will be searched when using the autocomplete widget.'),
'#weight' => -3,
);
}
}