2010-04-29 5 views

Répondre

1

Si vous créez un nouveau module, vous pouvez ajouter une implémentation de hook_form_alter pour vérifier toutes les formes et de modifier SUBMIT redirigent sur le formulaire approprié (s)

/* 
Implementation of hook_form_alter this method hooks into the submission of story forms 
and redirects appropriately 
*/ 
function my_redirect_module_form_alter(&$form, &$form_state, $form_id) { 
    //some code to filter the forms 
    if(!$form['#node']->type=='story') {return;} 
    //otherwise this is a for we want to fangle 
    $form_state['redirect'][0]='http://localhost/drupal_new/xyz.php'; 
    //this should leave all the ?q=node/xx untouched in $form_State['redirect'][1] 
} 

code écrit de la mémoire si YMMV ...

0

On dirait que vous aurez besoin de mettre en œuvre un module personnalisé pour la redirection.

Jetez un oeil à cette page: http://drupal.org/node/134000, en particulier la section "Comment redéfinir la redirection de formulaire par défaut". Il parle d'utiliser la fonction hook_form_alter() pour la redirection.