I answered how to default value to select list CCK with form_alter earlier, and noticed in the related section a bunch of questions following the same patter regarding CCK and hook_form_alter()
.
So I answered hook_form_alter selecting a default value in a node reference select list, but then I felt that there are a lot of answers on this precise topic that are incorrect so I can go on and on and provide a lot of similar answers. Of course I adapt my answer a little and actually write code and test it to be 100% sure it is working.
- Is this bad behavior?
- Should I down-vote the incorrect answers (which then may favorites mine)?