Add support for custom form-element supporting entity_reference

Created on 2 January 2024, 6 months ago
Updated 14 June 2024, 17 days ago

Problem/Motivation

Currently there is no easy way to use Tagify as autocomplete inside a custom form for a entity_reference form-element.

Here's an example of how I use the existing entity_reference type:

$form['user_reference'] = [
  '#type' => 'entity_autocomplete',
  '#target_type' => 'user',
  '#title' => t('User'),
  '#description' => t('Enter a user name or email address.'),
  '#default_value' => $current_user, // optional, a user object for pre-populating the field
];

It would be great to use tagify for this problem scenario, which is currently not possible, as the Tagify settings are stored inside a key/value store and retrieved in the autocomplete-handler, which is hard to mimic w/o a fully fledged field-widget.

Slightly related to #3352158

Feature request
Status

Fixed

Version

1.2

Component

Code

Created by

🇩🇪Germany stmh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024