function views_handler_field_contact_link::options_form in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 modules/contact/views_handler_field_contact_link.inc \views_handler_field_contact_link::options_form()
- 7.3 modules/contact/views_handler_field_contact_link.inc \views_handler_field_contact_link::options_form()
Default options form that provides the label widget that all fields should have.
Overrides views_handler_field_user_link::options_form
File
- modules/
contact/ views_handler_field_contact_link.inc, line 13
Class
- views_handler_field_contact_link
- A field that links to the user contact page, if access is permitted.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['link_display'] = array(
'#title' => t('Type of link'),
'#default_value' => $this->options['link_display'],
'#type' => 'select',
'#options' => array(
'link' => t('Link'),
'icon' => t('Icon'),
),
);
$form['text']['#title'] = t('Link label');
$form['text']['#required'] = TRUE;
$form['text']['#default_value'] = empty($this->options['text']) ? t('contact') : $this->options['text'];
}