vendredi 22 juin 2012

Drupal : module Webform, modifier l'action d'un formulaire

Dans votre fichier /sites/all/themes/montheme/template.php :

<?php
function montheme_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id=="webform_client_form_204") {
    $form['#action']=url("contact"); // url : /fr/contact
  }
}
?>

Aucun commentaire:

Enregistrer un commentaire