Fix for Fix for Drupal_execute example

  1.     $node = array('type' => 'innovation');
  2.        
  3.     $values = array();
  4.     $values['title'] = $form_values['title'];
  5.     $values['field_description'] = array(0 => array('value' => $form_values['description']));
  6.    
  7.     $values['field_contact' ] = array(0 => array('value' => $form_values['contact']));
  8.     $values['field_audience'] = array(0 => array('value' => $form_values['target']));
  9.     $values['field_value'] = array(0 => array('value' => $form_values['potential']));
  10.     $values['field_cost'] = array(0 => array('value' => $form_values['cost']));
  11.     $values['status'] = 1;
  12.     $values['promote'] = 0;
  13.     $values['name'] = $user->name;
  14.     $values['uid'] = $user->uid;
  15.  
  16.    drupal_execute('innovation_node_form', $values, $node);

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.