You are here

function fivestar_elements in Fivestar 5

Same name and namespace in other branches
  1. 6.2 fivestar.module \fivestar_elements()
  2. 6 fivestar.module \fivestar_elements()

Implementation of hook_elements().

Defines 'fivestar' form element type

File

./fivestar.module, line 1253
A simple n-star voting widget, usable in other forms.

Code

function fivestar_elements() {
  $type['fivestar'] = array(
    '#input' => TRUE,
    '#stars' => 5,
    '#widget' => 'stars',
    '#allow_clear' => FALSE,
    '#auto_submit' => FALSE,
    '#auto_submit_path' => '',
    '#labels_enable' => TRUE,
    '#feedback_enable' => TRUE,
    '#process' => array(
      'fivestar_expand' => array(),
    ),
  );
  return $type;
}