mercoledì 18 gennaio 2012

Cambiare l'url di webform in caso di submission non valida

La funzione da modificare è:

hook_form_alter(&$form, $form_state, $form_id) {

  if (substr($form_id,0,20) == 'webform_client_form_')  {

      $form['#action'] = $_SERVER['REQUEST_URI'];

  }

}


Al modulo creato per modificare la form di webform (vedi post) e' sufficente aggiungere:

  if (substr($form_id,0,20) == 'webform_client_form_')  {

      $form['#action'] = $_SERVER['REQUEST_URI'];

  }

Nessun commento: