You are here

function kaltura_views_handler_filter_kaltura_text::value_form in Kaltura 7.2

Same name and namespace in other branches
  1. 7.3 plugins/kaltura_views/kaltura_views_handler_filter_kaltura_text.inc \kaltura_views_handler_filter_kaltura_text::value_form()

Options form subform for setting options.

This should be overridden by all child classes and it must define $form['value'].

Overrides views_handler_filter::value_form

See also

options_form()

File

plugins/kaltura_views/kaltura_views_handler_filter_kaltura_text.inc, line 22

Class

kaltura_views_handler_filter_kaltura_text
this filter extends the one filed string filter to add all of the text fileds in the kaltura db

Code

function value_form(&$form, &$form_state) {
  if (!empty($form_state['exposed'])) {
    $identifier = $this->options['expose']['identifier'];
    $source = 'edit-' . drupal_html_id($this->options['expose']['operator_id']);
  }
  $form['value'] = array(
    '#type' => 'textfield',
    '#title' => t('Value'),
    '#size' => 60,
    '#default_value' => $this->value,
  );
  if (!empty($form_state['exposed']) && !isset($form_state['input'][$identifier])) {
    $form_state['input'][$identifier] = $this->value;
  }
  if (!isset($form['value'])) {

    // Ensure there is something in the 'value'.
    $form['value'] = array(
      '#type' => 'value',
      '#value' => NULL,
    );
  }
}