You are here

function _sliderfield_field_widget_info_sliderfield in SliderField 7.2

3 calls to _sliderfield_field_widget_info_sliderfield()
sliderfield_field_widget_info in ./sliderfield.module
sliderfield_form_webform_component_edit_form_alter in ./sliderfield.module
Implements hook_form_FORM_ID_alter ().
sliderfield_webform_component_render_alter in ./sliderfield.module
Implements webform_component_render_alter().

File

./sliderfield_element_sliderfield.inc, line 513

Code

function _sliderfield_field_widget_info_sliderfield() {
  return array(
    'sliderfield' => array(
      'label' => t('Slider'),
      'field types' => array(
        'number_decimal',
        'number_integer',
        'number_float',
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
      'settings' => array(
        'sliderfield_settings' => array(
          /**
           * Boolean: When set to true, the handle will animate with the default duration.
           * String: The name of a speed, such as "fast" or "slow".
           * Number: The duration of the animation, in milliseconds.
           */
          'animate' => TRUE,
          /**
           * Make the min value adjustable dynamically via another element
           * Type of the value is field name
           */
          'adjust_field_min' => NULL,
          /**
           * Make the max value adjustable dynamically via another element
           * Type of the value is field name
           */
          'adjust_field_max' => NULL,
          /**
           * Determines whether the slider handles move horizontally (min on left, max on right)
           * or vertically (min on bottom, max on top). Possible values: "horizontal", "vertical".
           */
          'orientation' => 'horizontal',
          /**
           * Whether the slider represents a range.
           * Multiple types supported:
           *   Boolean: If set to true, the slider will detect if you have two handles and create a stylable range element between these two.
           *   String: Either "min" or "max". A min range goes from the slider min to one handle. A max range goes from one handle to the slider max.
           */
          'range' => FALSE,
          /**
           * Determines the size or amount of each interval or step the slider takes between the min and max.
           * The full specified value range of the slider (max - min) should be evenly divisible by the step.
           */
          'step' => 1,
          /**
           * Some default color styles for ease of use
           * red, green, blue
           */
          'slider_style' => NULL,
          /**
           * If enabled display the current values of slider
           * as simple text
           */
          'display_values' => TRUE,
          /**
           * Format of the displayed values
           * The usage is mostly for showing $,% or other signs near the value
           */
          'display_values_format' => '%{value}%',
          /**
           * Display a hint/bubble near each slider handle showing the value of that handle
           */
          'display_bubble' => FALSE,
          /**
           * Format of the displayed value in bubble/hint
           * The usage is mostly for showing $,% or other signs near the value
           * For range slider it can have two values separated by || like "$%{value}%MIN||$%{value}%MAX"
           */
          'display_bubble_format' => '%{value}%',
          /**
           * Acceptable types are the same as css with and height and it will be used as width
           * or height depending on #orientation
           */
          'slider_length' => NULL,
          /**
           *
           */
          'hide_inputs' => TRUE,
          /**
           * Whether the slider represents more than one value.
           * Multiple types supported:
           *   0/False: Disabled.
           *   "separate" : Enabled. Uses field's multi value feature to store the values, currently only 2 values are supported.
           *        A separate handle for each value will be shown on slider
           */
          'multi_value' => FALSE,
          /**
           * When field is not required, and display_inputs option is inactive
           * a checkbox will be shown allowing user to ignore the field
           * and enter no value
           */
          'display_ignore_button' => TRUE,
          /**
           * When the slider does not have any value by enabling this option it won't show the
           * slider handle unless user clicks on the slider to select a value
           */
          'hide_slider_handle_when_no_value' => FALSE,
          /**
           * When hide_slider_handle_when_no_value is enabled, hide the no_value_text text
           * When user clicks on the slider for the first time
           * values : TRUE , FALSE
           */
          'no_value_text_auto_hide' => FALSE,
          /**
           * When hide_slider_handle_when_no_value is enabled, hide the no_value_text text
           * When user clicks on the slider for the first time
           * values : TRUE , FALSE, slow, fast
           */
          'no_value_first_select_slider_effect' => TRUE,
          /**
           * The text that will be displayed when hide_slider_handle_when_no_value
           * is enabled
           * values : STRING
           */
          'no_value_text' => 'Please click on any part of the slider to select a value.',
        ),
      ),
    ),
  );
}