function ldap_views_handler_field::options_form in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_views/handlers/ldap_views_handler_field.inc \ldap_views_handler_field::options_form()
- 7.2 ldap_views/handlers/ldap_views_handler_field.inc \ldap_views_handler_field::options_form()
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
1 call to ldap_views_handler_field::options_form()
- ldap_views_handler_field_attribute::options_form in ldap_views/
handlers/ ldap_views_handler_field_attribute.inc - Default options form provides the label widget that all fields should have.
1 method overrides ldap_views_handler_field::options_form()
- ldap_views_handler_field_attribute::options_form in ldap_views/
handlers/ ldap_views_handler_field_attribute.inc - Default options form provides the label widget that all fields should have.
File
- ldap_views/
handlers/ ldap_views_handler_field.inc, line 34 - LDAP field handler
Class
- ldap_views_handler_field
- @file LDAP field handler
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['multivalue'] = array(
'#type' => 'select',
// it should be 'radios', but it makes #dependency not to work
'#title' => t('Values to show'),
'#description' => t('What to do whith multivalue attributes'),
'#options' => array(
'v-all' => t('All values'),
'v-index' => t('Show Nth value'),
'v-count' => t('Count values'),
),
'#default_value' => $this->options['multivalue'],
'#required' => TRUE,
);
$form['value_separator'] = array(
'#type' => 'textfield',
'#title' => t('Value separator'),
'#description' => t('Separator to use between values in multivalued attributes'),
'#default_value' => $this->options['value_separator'],
'#dependency' => array(
'edit-options-multivalue' => array(
'v-all',
),
),
);
$form['index_value'] = array(
'#type' => 'textfield',
'#title' => t('Index'),
'#description' => t('Index of the value to show. Use negative numbers to index from last item (0=First, -1=Last)'),
'#default_value' => $this->options['index_value'],
'#dependency' => array(
'edit-options-multivalue' => array(
'v-index',
),
),
);
}