function google_analytics_reports_handler_field::options_form in Google Analytics Reports 7.3
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- handlers/
google_analytics_reports_handler_field.inc, line 57 - Definition of google_analytics_reports_handler_field.
Class
- google_analytics_reports_handler_field
- Provides base field functionality for Google Analytics fields.
Code
function options_form(&$form, &$form_state) {
if ($this->is_custom) {
$form['custom_field_number'] = array(
'#type' => 'textfield',
'#title' => t('Custom field number'),
'#default_value' => isset($this->options['custom_field_number']) ? $this->options['custom_field_number'] : 1,
'#size' => 2,
'#maxlength' => 2,
'#required' => TRUE,
'#element_validate' => array(
'element_validate_integer_positive',
),
);
}
parent::options_form($form, $form_state);
}