1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
   |  
function montheme_theme() {
  return array(
    // L'id de ton formulaire
    'user_register' => array(
      // Forms always take the form argument.
      'arguments' => array('form' => NULL),
    ),
  );
}
 
// A ce niveau, il faut vider le cache pour updater le theme registry
 
function montheme_user_register($form) {
	drupal_add_js(
		'$(document).ready(function(){
                         /* ton javascript ira dans une balise script du head */
		});', 
		'inline', 
		'header', 
		$defer = FALSE, 
		$cache = TRUE, 
		$preprocess = TRUE
	);
	$output .= drupal_render($form);
	return $output;
} | 
Partager