How to reset value

Created on 20 September 2023, 9 months ago
Updated 17 June 2024, 9 days ago

Problem/Motivation

I have installed the module and auxiliary libraries.

Added a field and selected the HTML5.
Editing the content and choosing the red color, save node.
Editing the content again, but I am unable to reset the color field value.

๐Ÿ› Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ฆUkraine orb

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

Comments & Activities

  • Issue created by @orb
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine orb
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine orb

    Spectrum widget - has widget settings with Empty color

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands zebda

    I'm also looking for a option like this...when I use the option to have multiple colors in one field (multi value field) I also want to be able to remove colors. When using the HTML 5 widget which is the best accessible one (Spectrum can't be used using the keyboard) I'm not able to empty the field is there some kind of work around or way to solve this? Is there a remove item buttons just like there is an add item button.

  • Arijit Acharya โ†’ made their first commit to this issueโ€™s fork.

  • @orb @zebda
    The HTML5 widget in this module doesn't allow for an empty selection. Once a color is chosen and saved, it becomes the default value. This means that leaving the color picker empty is not supported, and it inherits the default color set.
    Unlike the color picker, the Spectrum widget is actually a text field which allows users to leave the field empty, providing an option for no color selection.
    Additionally, to address the challenge of removing items when the field is set to multi-valued, I've prepared a patch that adds a remove button. This patch is applicable until Drupal version 10.2.2. It's worth mentioning that in Drupal 10.2.2, the core fixes the mentioned bug, and the remove button is already available.

  • Status changed to Needs review 5 months ago
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 5 months ago
    9 pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia atul ghate

    I have reviewed and applied patch #6, and it resolved the issue for the multi-value field in Drupal 9.5.0. The patch provided a button to remove items when the field is set to multi-valued, as described in comment #6. See the attached image.
    It can be moved to RTBC.

  • Status changed to RTBC 9 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia atul ghate
Production build 0.69.0 2024