function views_test_checkboxes_theme_form_views_exposed_form_alter
Same name in other branches
- 8.9.x core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme \views_test_checkboxes_theme_form_views_exposed_form_alter()
- 10 core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme \views_test_checkboxes_theme_form_views_exposed_form_alter()
- 11.x core/modules/views/tests/themes/views_test_checkboxes_theme/views_test_checkboxes_theme.theme \views_test_checkboxes_theme_form_views_exposed_form_alter()
Changes an exposed "type" filter from a multi-select to checkboxes.
File
-
core/
modules/ views/ tests/ themes/ views_test_checkboxes_theme/ views_test_checkboxes_theme.theme, line 13
Code
function views_test_checkboxes_theme_form_views_exposed_form_alter(&$form, FormStateInterface $form_state) {
if (isset($form['type'])) {
$form['type']['#type'] = 'checkboxes';
}
if (isset($form['tid'])) {
$form['tid']['#type'] = 'checkboxes';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.