[development] drupal_execute

Dale McGladdery torelad at gmail.com
Fri Nov 16 23:29:24 UTC 2007


These blog posts may help you with your troubleshooting:
http://www.civicactions.com/blog/cck_import_and_update
http://2bits.com/articles/creating-nodes-using-mini-forms-anywhere.html


> I was experimenting with drupal_execute, but this set of functions does
> not seem to work the way I expect it to. I change the function the node
> creation form submits to and then try to call drupal_execute to pass the
> values.
>
> function splitter_form_alter($form_id, &$form) {
>   if ($form_id == 'page_node_form') {
>     $form['#submit'] = array(
>       'splitter_submit' => array()
>     );
>   }
> }
>
> function splitter_submit($form_id, $form_values) {
>   drupal_execute('page_node_form', $form_values);
> }
>
> However, this does not seem to work. After I submit, I get a blank page
> and no node is created.
>
> What am I missing?


More information about the development mailing list