Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When adding a new node in D6, I want people to be able to select one of the pre-set colours (eg red, green, blue), and once the node is saved, to display the selected colour, and corresponding set Hex and RGB values.
Colour | Hex | RGB
Red #FF0000 255,0,0
Green #00FF00 0,255,0
Blue #0000FF 0,0,255
I could use a regular text field, and handle two values as a Key | Value pair, but this doesn't work with three values. Ideally I'd like three separate fields so I can create more flexible Views.
Hierarchical Select looks (a) like overkill (b) requires basic programming. Is there another way to set the value of one CCK field based on another?