I have a content type with a number of text fields and a field linked to a taxonomy vocabulary with about a dozen terms.
I have successfully developed code using the Form API to insert data from my custom form into my node using node_submit for the text fields. A sniped of the code I use is for the text fields is:
$node->field_s_phone[$node->language][0]['value'] = $form_state['values']['phone'];
$node->field_s_email[$node->language][0]['value'] = $form_state['values']['email'];
node_submit($node);
node_save($node);
I would like to implement a single set of checkboxes of my vocabulary terms on the custom form, then pass the values using node_submit in a similar fashion to the text fields (sort of like):
$node->field_catagories[$node->language][0]['value'] = $form_state['values']['catagories'];
I would be grateful for any thoughts or insight.
Thanks, Bill