How we can whitelist or blacklist items from selection?
My current code looks like this:
$form['field_allowed_viewers'] = [
'#type' => 'entity_autocomplete_tagify',
'#target_type' => 'user',
'#title' => $this->t('Grant Access To'),
'#description' => $this->t('Users who can view this private gallery (besides you).'),
'#tags' => TRUE,
'#max_items' => 20,
'#selection_handler' => 'default:user',
'#selection_settings' => [
'include_anonymous' => FALSE,
],
];
Tried different approaches:
'#selection_settings' => ['blacklist' => $uids] or ['whitelist' => $uids]
but unfortunatelly nothing works. Any suggestions?
Active
1.2
Code