Add 'title' to field config to use as default for widget config

Created on 3 January 2023, almost 2 years ago
Updated 16 May 2024, 6 months ago

Problem/Motivation

JSON:API entities do not have a fixed attribute that can be considered the title of that entity. For example, the JSON:API entity representing a Drupal node will use 'title', but a JSON:API entity representing a Drupal taxonomy term will use 'name'.

So that the autocomplete widget can know against which attribute it should pattern match following user input, it has configuration to identify which JSON:API attribute should be used.

We are now looking at adding more types of form widgets: Add select list widget Needs work #3314975: Add radio buttons widget

Changing between form widgets for an existing field means that this 'title' attribute setting needs specifying each time.

This issue proposes adding a title attribute to the field which can then be automatically inherited as the default autocomplete attribute in the autocomplete widget, but can be pverridden on a per field basis.

Steps to reproduce

N/A

Proposed resolution

Move the configuration from the autocomplete widget to the field.

Remaining tasks

  • Add the title attribute to the field.
  • Use title attribute as the default autocomplete attribute.

User interface changes

As tasks.

API changes

None.

Data model changes

Additional configuration for the 'title' attribute on the field.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom Eli-T Manchester

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024