I am usingCCK 2 (2.9), and I know that CCK field give the option to assign the default value using the pipe, for example
Please select|Please select
But I am just curious about if exist a programatically way to assign a default value to a select list. I have several tries, using this kind of syntax:
$form['field_color']['value']['#default_value'] = 'Black'; //or
$form['field_color']['#default_value'] = 'Black'; //or
$form['field_color']['#default_value'][0]['value'] = 'Black';
but nothing. To me not is clear what is the correct syntax.
thanks in advance.