Form submits should return a destination path, not do a drupal_goto
robertDouglass - August 21, 2007 - 10:09
| Project: | AutoPilot |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
<?php
function autopilot_add_target_form_submit($form_id, $form_values) {
// check for target with duplicate name
//
if (autopilot_get_target(array("name" => $form_values['name'])) && !$form_values['tid']) {
drupal_set_message("name", "The Target with name {$form_values['name']} already exists. Please select another.");
return drupal_get_form($form_id);
}
autopilot_save_target($form_values);
drupal_goto("admin/autopilot/configure");
}
?>you can just return 'admin/autopilot/configure'. Doing drupal_goto manually actually creates bugs.

#1
Fixed in beta-1
#2
Automatically closed -- issue fixed for two weeks with no activity.