Hello,

I am looking for a CCK field that allows me to specify a list of allowed values. For the end-user interface, they should be able to select them one or multiple values via checkboxes or dropdown list.

I looked everywhere but did not find anything I want. I could have missed something.

Anybody knows whether there is such a module ?

All the best.

Comments

Patroclas’s picture

CCK tetxt fields can be set as select lists (as well as radio or check boxes) . Multiple selections are allowed, or can be restricted to single.

MDDC’s picture

Thanks for the tip. Yes, it completely meets my need.

I am kind of new to Drupal. Thanks for help!

Best.

mysty’s picture

  • enable CCK Content, Text and Option Widget modules in admin/build/modules
  • in your content types admin/content/types create your new content type, and then select the manage fields link

Reference this picture at http://twitpic.com/2qcbgo

  1. select 'Text' as type of data to store, and then either 'check boxes/radio buttons' or 'single on/off checkbox' depending on your use case, and hit 'Save'
  2. In the next screen under Global Settings, enter the allowed values list, one per line. If the number of values is ONE for this setting then it will become a set of Radio Buttons, unlike below which is check boxes..
  3. In this example the result is a series of checkboxes as 'Number of Values' is unlimited

Probably not the best screens to show but it's what I had at hand!

Hope that helps, and have fun!

mysty’s picture

heh, too slow of me

MDDC’s picture

Mysty, thank you a million for the detailed instruction. I TRUELY appreciate it.

All the best!

nevets’s picture

You might also want to consider using a vocabulary (taxonomy module) to define the list of values. It makes it easier to find all nodes with a particular term (value).

MDDC’s picture

Taxonomy for this is interesting idea. I am seriously thinking about it. One consideration against taxonomy is my list of values is short. Using dropdown for selecting multiple values is not so user-friendly as to using checkboxes.

Cheers!

MDDC’s picture

If I use taxonomy and multiple select, is there a way to control of the number of values to show in a dropdown list?