How to configure chosen field on Form API with drupal 8. I have already installed chosen and it’s works in User Interface and not in form API.
This peace of code doesn’t work:
$form['tags'] = array( '#type' => 'entity_autocomplete', '#chosen' => TRUE, '#target_type' => 'taxonomy_term', '#selection_settings' => ['target_bundles' => ['tags']], '#title' => ('Tags'), '#empty_value' => '' ;