Drupal 6 - I am using drupal_execute to insert a CCK node into my site. Everything is working excep

Posted by rdurbin on Stack Overflow See other posts from Stack Overflow or by rdurbin
Published on 2010-06-09T21:37:35Z Indexed on 2010/06/16 21:02 UTC
Read the original article Hit count: 221

Filed under:
|
|
  $form_state['values']['field_prx_mp3_labels'][0][value] = $mp3_labels;  
  $form_state['values']['taxonomy'][0][value] = array('tags'=>array('1'=>'Music'));  
  $errs = drupal_execute('prx_content_node_form', $form_state, (object) $nodeTmp);  

This is a Drupal 6 site. I am using drupal_execute to create a node programatically. The first line is working for field_prx_mp3_labels. The second (for taxonomy) is not.

Here is what my select on the node add for my cck looks like:

<select name="taxonomy[2][]" multiple="multiple"  class="form-select" id="edit-taxonomy-2"  size="9"><option value="">- None -</option><option value="5">Music</option><option value="6">-Rock/Pop</option><option value="7">-Jazz/Blues</option><option value="8">-Classical</option><option value="9">-Music Documentaries</option><option value="10">-Festivals/Concerts</option><option value="11">Arts</option><option value="19">-Literature</option><option value="12">Nature</option><option value="13">History</option><option value="15">-Music</option><option value="14">Culture</option><option value="17">-American Indian</option><option value="18">-Latino</option><option value="16">-Youth Perspective</option></select> 

I have tried many many variations for line 2 (relating to the taxonomy).

This comment seemed close but it hasn't worked for me: http://drupal.org/node/178506#comment-1155576

Thanks!

© Stack Overflow or respective owner

Related posts about drupal

Related posts about drupal-6