the follow code is fro开发者_如何学Cm it's documentation,it's too abstract. expect someone can help me how to do it.
Removing CCK N/A field using a preprocess function...
Before you assign your radios to a variable use the following code:
<?php
unset($vars['form']['group_if_in_fieldset']['field_the_radios']['value']['']); //remove the pesky CCK N/A radio
?>
i have put the code into the mytheme_preprocess_node(){} but it can't work.
if you want to remove N/A then make the field required, it should go away.
My guess would be that the strings used as indices are only placeholders. If you have created a CCK field called "item_status", your field will likely be called "field_item_status", not "field_the_radios". Same goes to the fieldset group name (if you happen to have your radios in a group).
精彩评论