phpJSvForm  v11.11.12
Des classes PHP, des JavaScripts pour créer facilement un formulaire.
phpJSvForm/exemples/format.php
Aller à la documentation de ce fichier.
00001 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
00002 <html xmlns="http://www.w3.org/1999/xhtml">
00003      <head>
00004           <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
00005           <title>Test Formulaire - Formatage des champs</title>    
00006           <script type="text/javascript" src="form/init.js"></script>
00007           <script type="text/javascript" src="form/jsVerifForm.js"></script>
00008           <link rel="stylesheet" type="text/css" href="form/cssVerifForm.css" />
00009      </head>
00010      <body>  
00011 <?php
00024      require_once('../form/clVerifForm.php');
00025      
00026      $form1 = new Form(); 
00027      $text1 = new Input('text1','Téléphone : '); 
00028      $text2 = new Input('text2','Courriel : '); 
00029      $text3 = new Input('text3','Site web : '); 
00031      $form1->addElement('Ce formulaire vérifie le format de chaque champ...', $text1, $text2, $text3) ;
00032      $form1->addVerif('tel',$text1,'courriel',$text2,'url',$text3) ;
00033 
00034      if($form1->verifForm())
00035      {
00036           echo '<p>Traitement possible... Tout est ok...</p>' ;
00037           echo '<pre>' ;
00038           print_r($_POST) ;
00039           echo '</pre>' ;
00040      }
00041      else
00042           echo $form1;
00043 ?>
00044     </body>
00045 </html>