You are here

function fivestar_widget_settings in Fivestar 6.2

Same name and namespace in other branches
  1. 5 fivestar_field.inc \fivestar_widget_settings()
  2. 6 fivestar_field.inc \fivestar_widget_settings()

Implementation of hook_widget_settings().

File

includes/fivestar.field.inc, line 191
Provides CCK integration for fivestar module

Code

function fivestar_widget_settings($op, $widget) {
  switch ($op) {
    case 'form':
      $form = array();
      $form['allow_clear'] = array(
        '#type' => 'checkbox',
        '#title' => t('Allow user to clear value'),
        '#default_value' => isset($widget['allow_clear']) ? $widget['allow_clear'] : 1,
      );
      return $form;
    case 'save':
      return array(
        'allow_clear',
      );
  }
}