function ajax_comments_handler_field_ajax_add_comment::options_form in AJAX Comments 7
Default options form provides the label widget that all fields should have.
Overrides views_handler_field_comment_node_link::options_form
File
- views/
ajax_comments_handler_field_ajax_add_comment.inc, line 17
Class
Code
function options_form(&$form, &$form_state) {
$form['text'] = array(
'#type' => 'textfield',
'#title' => t('Text to display'),
'#default_value' => $this->options['text'],
);
$actions = array(
1 => t('Show message'),
2 => t('Show link'),
);
$form['submit_action'] = array(
'#type' => 'select',
'#title' => t('After submit action'),
'#description' => t('Select the after comment submited action.'),
'#options' => $actions,
'#default_value' => $this->options['submit_action'],
);
parent::options_form($form, $form_state);
// The path is set by render_link function so don't allow to set it.
$form['alter']['path'] = array(
'#access' => FALSE,
);
$form['alter']['external'] = array(
'#access' => FALSE,
);
}