- Issue created by @SirClickALot
I am trying to ass the Select 2 widget to the 'Content type' filer on the standard Content Admin page (/admin/content
).
Reading around all over, I am assured that adding the following to my custom module form_alter() implementation should do the trick but to no avail...
function MY_MODULE_form_alter(&$form, FormStateInterface $form_state, $form_id): void {
// Add the Select 2 widget to the Content admin page
if ($form_id === 'views_exposed_form') {
if (isset($form['type'])) {
$form['type']['#select2'] = TRUE;
}
}
}
I have tried all sorts of variations but can't seem to get the Select 2 JS to kick in.
Can anyone please advise?
Thank you
Active
2.0
User interface