[support] CCK Question

Yves Chedemois yched.drupal at free.fr
Fri Apr 27 20:09:06 UTC 2007


A-NO-NE Music a ecrit le 27/04/2007 21:46:
> Cyberswat / 2007/04/24 / 02:01 PM wrote:
>   
> I just wanted to a little experiment with CCK by creating 2 Lists to
> attach year label and month label for the content for later sorting.  I
> was hoping something like:
>       <option selected="selected">-- Select One --</option>
>       <option>one</option>
>       <option>two</option>
>       <option>three</option>
> But it seems I am supposed to know array() => Drupal API.
>   
The optionwidgets.module that comes with the CCK bundle does just that :
use a select list (or checkboxes , or radiobuttons) to edit a field 
instead of the regular textfield input.
If  you want to do just "One / Two / Three" stuff, that should be just 
fine - applies to 'text' and 'number' field types.

If you need more advanced semantics with actual dates, the date.module 
Laura pointed is probably your first step.



More information about the support mailing list