You are here

function chosen_field_widget_settings_form in Chosen 7

Same name and namespace in other branches
  1. 6 chosen.module \chosen_field_widget_settings_form()
  2. 7.3 chosen.module \chosen_field_widget_settings_form()
1 call to chosen_field_widget_settings_form()
chosen_form_field_ui_field_edit_form_alter in ./chosen.module
Implements hook_form_alter().

File

./chosen.module, line 77
General functions and hook implementations.

Code

function chosen_field_widget_settings_form($field, $instance) {
  $widget = $instance['widget'];
  $settings = $widget['settings'];
  $form['chosen'] = array(
    '#type' => 'fieldset',
    '#title' => t('Chosen'),
    '#collapsed' => TRUE,
    '#collapsible' => TRUE,
    '#parents' => array(
      'instance',
      'widget',
      'settings',
    ),
  );
  $form['chosen']['apply_chosen'] = array(
    '#type' => 'checkbox',
    '#title' => t('Apply Chosen on this field'),
    '#default_value' => $settings['apply_chosen'],
  );
  return $form;
}