function tripal_views_handler_area_action_links::options_form
2.x tripal_views_handler_area_action_links.inc | tripal_views_handler_area_action_links::options_form(&$form, &$form_state) |
3.x tripal_views_handler_area_action_links.inc | tripal_views_handler_area_action_links::options_form(&$form, &$form_state) |
Default options form that provides the label widget that all fields should have.
Overrides views_handler_area::options_form
File
- tripal_views/
views/ handlers/ tripal_views_handler_area_action_links.inc, line 38 - Contains tripal_views_handler_area_action_links Area Handler
Class
- tripal_views_handler_area_action_links
- Provides an area for adding action links to a view.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['label']['#default_value'] = 'Action Links';
$form['link-1'] = array(
'#type' => 'fieldset',
'#title' => t('Link #1')
);
$form['link-1']['label-1'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#description' => t('The text that will be displayed as the link'),
'#default_value' => $this->options['link-1']['label-1'],
);
$form['link-1']['path-1'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#description' => t('The path that the link will link to'),
'#default_value' => $this->options['link-1']['path-1']
);
$form['link-2'] = array(
'#type' => 'fieldset',
'#title' => t('Link #2')
);
$form['link-2']['label-2'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#description' => t('The text that will be displayed as the link'),
'#default_value' => $this->options['link-2']['label-2'],
);
$form['link-2']['path-2'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#description' => t('The path that the link will link to'),
'#default_value' => $this->options['link-2']['path-2']
);
$form['link-3'] = array(
'#type' => 'fieldset',
'#title' => t('Link #3')
);
$form['link-3']['label-3'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#description' => t('The text that will be displayed as the link'),
'#default_value' => $this->options['link-3']['label-3'],
);
$form['link-3']['path-3'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#description' => t('The path that the link will link to'),
'#default_value' => $this->options['link-3']['path-3']
);
$form['link-4'] = array(
'#type' => 'fieldset',
'#title' => t('Link #4')
);
$form['link-4']['label-4'] = array(
'#type' => 'textfield',
'#title' => t('Label'),
'#description' => t('The text that will be displayed as the link'),
'#default_value' => $this->options['link-4']['label-4'],
);
$form['link-4']['path-4'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#description' => t('The path that the link will link to'),
'#default_value' => $this->options['link-4']['path-4']
);
}