Invalid hex color

artwork - June 15, 2009 - 08:41
Project:Colorpicker
Version:6.x-2.0-rc3
Component:Code
Category:bug report
Priority:normal
Assigned:skilip
Status:active
Description

I add colorpicker field as cck field and it is "NOT required field" this is where error came.

'' is not a valid hex color
The default value is invalid

Why should I set default if I don't required this field I think I should have a choice to leave it blank.
This also happen in node/add when I try to create node it asked me to fill the color, I use unlimited filed, so it end up I have to put at least two color to add a node (unlimited field has two default field).

#1

hlykos - June 21, 2009 - 19:05

I have the same problem, it seems to work properly if you avoid multiple values.

#2

skilip - June 22, 2009 - 07:21

I'll fix this this week

#3

skilip - June 22, 2009 - 07:21
Component:User interface» Code
Assigned to:Anonymous» skilip

#4

eu.claudio - July 1, 2009 - 14:00

subscribing

#5

slurslee - July 23, 2009 - 04:38

thank you! looking forward to the official 2.0 release party

#6

skilip - July 24, 2009 - 06:04

This patch fixes the validation bug

AttachmentSize
colorpicker_invalid_hex_color.491934.1.patch 1.11 KB

#7

jrust - August 14, 2009 - 16:21

Hmm, I applied the patch, and it does remove the validation error. However, now when I submit a node with an empty colorpicker value it automatically sets it to #FF0000.

#8

skilip - August 24, 2009 - 12:37

Isn't that the default value specified in the Content Fields settings page? Did you try leaving that empty?

#9

jrust - August 24, 2009 - 16:47

Yeah, the default value is blank for the content field settings field. Not sure where the FF0000 is coming from.

 
 

Drupal is a registered trademark of Dries Buytaert.