- 🇫🇷France canardesign Montpellier
Thank you for the tip ! I had to set the palette this way in order to get it to work :
$element['#attached']['drupalSettings']['color_field']['color_field_widget_box']['settings'][$element['#uid']]['palette'] = $colors;
- 🇮🇹Italy finex
Hi, I've created a patch with the following features:
- Add a settings page to define the colors palette.
- Add a widget settings to allow entering a custom hex code on the box widget.
- Load the settings palette colors as default value when the field is configured of if the field settings value is empty. - 🇮🇹Italy finex
Updated patch, the previous had a typo on a couple of filenames.
- Assigned to shivam_tiwari
- 🇮🇳India shivam_tiwari
I worked here and checked module functionality according to the description provided of this issue. I checked patch #8, and it is working fine but I was not getting custom color palette created by user on the field settings. Actually, this default colors field is a required field and we added a condition for overriding it if this filed value is empty. When I am going to clear this value for setting custom color palettes it is not working. It is giving me required field error. So I removed required attribute from this.
Now if we clear existing default values we will get custom color palettes added on the settings page.
Second, I updated the info file also of the module to visit user to settings page directly.For now pipeline is failing so changing issue status to Needs work for fixing pipeline failure.