Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By belyj_vladislav on
Hey,
I have an entity reference form element with autocomplete widget (some options skiped):
$element = array(
"target_id" => array(
"#title" => "My autocomplete field",
"#type" => "entity_autocomplete",
"#target_type" => "taxonomy_term",
"#selection_handler" => "default:taxonomy_term",
"#selection_settings" => array(
"target_bundles" => array(
"tags" => "tags",
),
),
"#autocreate" => array(
"bundle" => "tags",
"uid" => 1,
),
"#tags" => 1,
),
);
How I can generate an autocomplete url of this form element? For example, in Drupal 7, this url is being in #autocomplete_path option of element.