title: Drupal 7 programmatically submit form
body: <pre><code>$form2_id = 'commerce_product_ui_product_form';
  
  $form2_state['values'] = array(
      'sku' =&gt; 'xyz100',
      'title' =&gt; 'xyz',
      'commerce_price' =&gt; '355',
      'op' =&gt; t('Save Product')
   );
  
   drupal_form_submit($form2_id, $form2_state);
  
  $form_errors = form_get_errors();
  drupal_set_message('Form errors = '.$form_errors);
  </code></pre>
  
  <p>I get no errors but lots of warnings... and the data is not saved to the db.</p>
  
  <p>call_user_func_array() expects parameter 1 to be a valid callback, function 'commerce_product_product_form' not found or invalid function name in drupal_retrieve_form() </p>