Provide Filter Condition In Autocomplet Field In Drupal Form Using

[Solved] Provide Filter Condition In Autocomplet Field In Drupal Form Using | Php Frameworks Drupal - Code Explorer | yomemimo.com
Question : provide filter condition in autocomplet field in drupal form using property

Answered by : jolly-jellyfish-2zhpzgos1m6q

$form['my_element'] = [ '#type' => 'entity_autocomplete', '#target_type' => 'node', '#selection_handler' => 'default:node_by_field', '#selection_settings' => [ 'target_bundles' => ['article'], 'filter' => ['field_dummy_filter' => $dummy_field_value], ],
];

Source : https://fivejars.com/blog/change-entity-autocomplete-selection-rules-drupal-8 | Last Update : Wed, 29 Jul 20

Answers related to provide filter condition in autocomplet field in drupal form using property

Code Explorer Popular Question For Php Frameworks Drupal