I want to create a CCK field in my custom content type where the value (an integer select list) will display the appropriate image once selected. CCK fields allow for custom PHP, has anyone done this?

For example. Lets say I have a field named 'Transportation' with 3 value, car, truck, boat.

If 'car' is selected, then a predefined photo of a car is displayed on the custom node.

Can anyone show me how to do this?

Comments

mtsanford’s picture

You could probably do this with a computed field

http://drupal.org/project/computed_field

WorldFallz’s picture

You might also consider doing it with taxonomy and the http://drupal.org/project/taxonomy_image module.

rewted’s picture

Should be able to do it within the CCK field with PHP... I just don't know PHP. :)

rewted’s picture

Nobody?

jacobson’s picture

Did you ever find an answer to this problem or figure it out? Seems to me that this would be a new display formatter.

rewted’s picture

Yes thank you.

chinita7’s picture

Has anyone solved this feature already???