Closed (outdated)
Project:
Color Field
Version:
7.x-1.6
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2013 at 00:25 UTC
Updated:
26 Jul 2020 at 19:13 UTC
Jump to comment: Most recent
Comments
Comment #1
inteja commentedFYI: Managed to do this manually with the following code. Doing it this way also means you can use the extra features of the spectrum color picker (like rgba colors) that color_field doesn't yet support.
In your theme's theme-settings.php:
Comment #2
targoo commentedThanks for the feedback and the code snippet.
I will add an extra documentation page to cover use cases like this one.
Comment #3
navinder commentedI was trying to add color_field to a custom form by referring to code snippet above in a Drupal 8 site, but it is only showing me a plain text field. Is something additional that I need to do for Drupal 8? I have this module installed and working.
Comment #4
nickdickinsonwildehmm I've never had that use case. For some cases, just changing `#type` to `color` rather than `textfield` might work, but that won't do everything that color field can do. If that doesn't provide what you need, let me know and I'll try and take a look sometime soon.
BTW, for old threads like this, instead of reviving a closed issue from 4 years ago (aka thread necromancy), better to create a new ticket linking if relevant.
Ps. welcome fellow Canadian :D
Comment #5
navinder commentedThank you Nick! Replacing type with "color" only producing a black rectangle not the color field. And I agree about creating a new thread but here I thought putting it here might be easier for others as they already have a sense of the issue.
Comment #6
nickdickinsonwildeAs there hasn't been a D7 Color Field maintainer in a long time, closing this issue. Feel free to re-open if you are interested in getting involved.