You are here

function fivestar_form_field_ui_field_edit_form_alter in Fivestar 7.2

Same name and namespace in other branches
  1. 8 fivestar.module \fivestar_form_field_ui_field_edit_form_alter()

File

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

Code

function fivestar_form_field_ui_field_edit_form_alter(&$form, $form_state) {
  $field = $form['#field'];
  $instance = $form['#instance'];
  if ($field['type'] == 'fivestar') {

    // Multiple values is not supported with Fivestar.
    $form['field']['cardinality']['#access'] = FALSE;
    $form['field']['cardinality']['#value'] = 1;

    // Setting "default value" here is confusing and for all practical purposes
    // with existing widgets provided by fivestar (and anything else available
    // in contrib) meaningless.
    $form['instance']['default_value_widget']['#access'] = FALSE;
  }
}