function beautytips_textinput_admin_info in BeautyTips 8
Same name and namespace in other branches
- 6.2 includes/textinput.inc \beautytips_textinput_admin_info()
- 7.2 includes/textinput.inc \beautytips_textinput_admin_info()
File
- includes/
textinput.inc, line 7
Code
function beautytips_textinput_admin_info() {
$form['beautytips_text'] = [
'#type' => 'fieldset',
'#title' => 'Text Input Tooltips',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
];
$form['beautytips_text']['beautytips_text_input'] = [
'#type' => 'checkbox',
'#title' => 'Display Text input popups',
'#default_value' => \Drupal::state()
->get('beautytips_text_input', FALSE),
];
$form['beautytips_text']['beautytips_position'] = [
'#type' => 'radios',
'#title' => 'Which side should the text popups appear on?',
'#options' => [
'bottom' => t('bottom'),
'top' => t('top'),
'left' => t('left'),
'right' => t('right'),
],
'#default_value' => \Drupal::state()
->get('beautytips_position', 'bottom'),
];
$form['beautytips_text']['form_id'] = [
'#type' => 'fieldset',
'#title' => 'Restrict text popups to specific forms. (OPTIONAL)',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
];
$form['beautytips_text']['form_id']['beautytips_form_id'] = [
'#type' => 'textfield',
'#title' => 'Enter the form id(s) to use for text popup beautytips',
'#description' => t('You need to use Drupal php syntax like page_node_form'),
'#default_value' => \Drupal::state()
->get('beautytips_form_id', ''),
];
$form['beautytips_text']['form_id']['beautytips_show_form'] = [
'#type' => 'checkbox',
'#title' => 'Display form_ids',
'#description' => t("Turn this on if you want to see the names of the form ids to enter above. The names will appear on the pages where the forms are displayed.") . '<div>' . t("Make sure that you turn it off when you're done retrieving the form_ids.") . '</div>',
'#default_value' => \Drupal::state()
->get('beautytips_show_form', ''),
];
return $form;
}