You are here

function qtip_views_handler_field_tooltip::options_form in qTip (Stylish jQuery Tooltips) 7.2

Same name in this branch
  1. 7.2 modules/qtip_views/handlers/qtip_views_handler_field_tooltip.inc \qtip_views_handler_field_tooltip::options_form()
  2. 7.2 modules/qtip_views/views/handlers/qtip_views_handler_field_tooltip.inc \qtip_views_handler_field_tooltip::options_form()

Default options form provides the label widget that all fields should have.

Overrides views_handler_field_custom::options_form

File

modules/qtip_views/views/handlers/qtip_views_handler_field_tooltip.inc, line 15

Class

qtip_views_handler_field_tooltip

Code

function options_form(&$form, &$form_state) {

  // First get the basic form fields (label, textfield, exclude display)...
  parent::options_form($form, $form_state);

  // ... then build our custom fields
  $form['qtip_views'] = array(
    '#type' => 'fieldset',
    '#title' => t('qTip settings'),
    '#collapsible' => FALSE,
  );
  $form['qtip_views']['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#description' => t('The title to give the tooltip.'),
    '#default_value' => $this->options['qtip_views']['title'],
  );
  $form['qtip_views']['text'] = array(
    '#type' => 'textarea',
    '#title' => t('Text'),
    '#description' => t('The text to display for the tooltip of this field. You may include HTML. You may enter data from this view as per the "Replacement patterns".'),
    '#default_value' => $this->options['qtip_views']['text'],
  );
  $form['qtip_views']['hide_if_equal'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide the tooltip if equal to the text'),
    '#default_value' => $this->options['qtip_views']['hide_if_equal'],
  );
  $form['qtip_views']['instance'] = qtip_fetch_instances_field($this->options['qtip_views']['instance']);
}