Software engineer, data guy, Open Source enthusiast, New Hampshire resident, husband, father. Fan of guitars, hiking, photography, homebrewing, sarcasm.
Drupal 6: Implementing a color picker field in a Drupal form
I recently added an admin settings page to allow the user to select colors for node title labels. I quick Google search and I discovered this promising jQuery color picker library. Here’s how I embedded it in a form.
First I unpacked the colorpicker.zip file and moved it into my theme folder. Next I added a form callback function in my module.
Now my form has a text input that uses a fancy color picker to choose the hex value. More documentation on the color picker can he found here.
Here’s a screenshot of the color picker in action: