Does drupal_execute handle redirection after form submit? I get the form displayed but not redirected after calling test_drupal_execute.

function test_drupal_execute() {
   $form_id= 'myform';
   $field_values=array('color'=> 'Orange');
   drupal_execute($form_id, $field_values);
}
function myform(){
  drupal_set_message('<pre>'.print_r($form, TRUE).'</pre>');  
  $form['color']=array(
    '#type'=>'textfield',
    '#default_value'=>'Green');
  $form['#action']= 'http://www.colorpicker.com/colorgalary';
  $form['submit'] = array('#type' => 'submit', '#value' => t('Update'));
  return $form;  
}
function myform_submit($form_id, $form_values){
   print_r('Color Picker Page Welcome!');  
}

Comments

chales’s picture

drupal_execute will return output that can be used for a redirect.

http://drupal.org/node/186439

mediacurrent.com


DrupalVoodoo