voila
sur mon formulaire
j'ai un petit soucis
pour les champs obligatoires ca c'est ok
mais je voudrai que certains ne le soient pas
et la ...
mon cerveau fond, je vois pas quoi faire
une petit coup de paluche ?
je voudrai que tout ce qui est saisie d'infos de l'utilisateur = obligatoire
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177 <html> <head> <title>blabla</title> <SCRIPT LANGUAGE="JavaScript"> function VerifForm(formulaire) { adresse = formulaire.email.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if ((place > -1)&&(adresse.length >2)&&(point > 1)) { formulaire.submit(); return(true); } else { alert('Veuillez inserer une adresse E-mail valide !\nSi votre E-mail est incorrecte, vous ne recevrez pas de réponse.'); return(false); } } </SCRIPT> <script type="text/javascript"> // Si la variable suivante est à true, les mots interdits sont remplacés par des étoiles. // Sinon, il sont effacés. var RemplacementEtoiles = true; // Nombre de caractères maximum du textarea var Nombre_Caracteres_Maximum = 1000000000; // Nombre de caractères minimimal à partir duquel il n'y a plus de doute : // Le mot qui est scanné est bien un mot interdit. // Valeur par défaut : 4 // EXEMPLE : // Mettez le mot 'con' dans le tableau des mots interdits. // Tapez le mot conSpiration. // Mettez le curseur du textarea juste avant le S. // Tapez un espace. ===> le mot 'con' est remplacé. // Si vous mettez la variable suivante à 3, et que vous recommencez l'opération, vous ne pourrez pas taper le mot conspiration. var Constante_Doute = 4; </script> <script type="text/javascript" src="limitation.js"></script> </head> <body bgcolor="#FFFFFF"> <center> <form method="post" action="ok.php" onSubmit="return(VerifForm(this))"> <p> </p> <table width="44%" border="0"> <tr> <td width="51%"><div align="right">Société : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="societe" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> <td width="49%"> <div align="right">Nom : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="nom" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></div></td> </tr> <tr> <td><div align="right">Adresse : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="adresse" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> <td> <div align="right">Téléphone : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="tel" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> </tr> <tr> <td> <div align="right">Code postal : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="cp" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> <td> <div align="right">Fax : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="fax" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> </tr> <tr> <td> <div align="right">Ville : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="ville" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> <td> <div align="right">Email : <input type="text" onKeyUp="Compter(this, this.form.CharRestant);" name="email" size="20" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </div></td> </tr> </table> <p><br> </p> <table width="48%" border="0"> <tr> <th width="60%" scope="col">Référence</th> <th width="13%" scope="col">Quantité </th> <th width="14%" scope="col">Avec visuel </th> <th width="13%" scope="col">Sans visuel</th> </tr> <tr> <th scope="col"> <input type="text" name="ref1" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte1" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu1" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu1" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref2" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte2" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu2" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu2" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref3" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte3" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu3" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu3" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref4" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte4" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu4" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu4" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref5" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte5" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu5" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu5" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref6" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte6" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu6" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu6" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref7" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte7" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu7" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu7" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref8" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte8" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu8" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu8" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref9" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte9" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu9" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu9" VALUE="sans visuel"> Non </th> </tr> <tr> <th scope="col"><input type="text" name="ref10" size="50" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><input type="text" name="qte10" size="10" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"></th> <th scope="col"><INPUT TYPE="radio" NAME="visu10" VALUE="avec visuel"> Oui </th> <th scope="col"><INPUT TYPE="radio" NAME="visu10" VALUE="sans visuel"> Non </th> </tr> </table> <p><br> <br> <br> <br> <br> <br> <br> </p> <p> <input type="submit" name="Submit" value="Envoyer" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> <input type="reset" name="Reset" value="Effacer" style="Border-Color: #A1B3B9; Border-Style: dashed; Border-Width: 2px;background-color: #c2d2d7;"> </form> <br><br><br> </center> </body> </html>
et tout ce qui est commande en dessous (reference, quantité, etc ...)
meme si c'est blanc, ca valide
Partager