Помогите пожалуйста решить проблему с формой, нужно что бы была проверка по каждой колонке, т.е в каждой колонке только один верный чекбокс, если введен ответ неверно в одной из них выводим ошибку
HTML5 |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Я хочу зарегестрироваться</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
</head>
<body id="main_body" >
<img id="top" src="top.png" alt="">
<div id="form_container">
<h1><a>Я хочу зарегестрироваться</a></h1>
<form id="form_407868" class="appnitro" method="post" action="">
<div class="form_description">
<h2>Я хочу зарегестрироваться</h2>
<p>тест:</p>
</div>
<ul >
<li id="li_1" >
<label class="description">Вопрос 1: <span id="required_1" class="required">*</span></label>
<span>
<span>
<input id="element_1_1" name="element_1_1" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_1_1">а1</label>
<input id="element_1_2" name="element_1_2" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_1_2">а2</label>
<input id="element_1_3" name="element_1_3" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_1_3">а3</label>
</span>
</li> <li id="li_2" >
<label class="description">Вопрос 2: <span id="required_2" class="required">*</span></label>
<span>
<input id="element_2_1" name="element_2_1" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_2_1">б1</label>
<input id="element_2_2" name="element_2_2" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_2_2">б2</label>
<input id="element_2_3" name="element_2_3" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_2_3">б3</label>
</span>
</li> <li id="li_3" >
<label class="description">Вопрос 3: <span id="required_3" class="required">*</span></label>
<span>
<input id="element_3_1" name="element_3_1" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_3_1">в1</label>
<input id="element_3_2" name="element_3_2" class="element checkbox" type="checkbox" value="1" />
<label class="choice" for="element_3_2">в2</label>
</span>
</li>
<li class="buttons">
<input type="hidden" name="form_id" value="407868" />
<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>
<div id="footer">
Generated by <a href="http://www.phpform.org">pForm</a>
</div>
</div>
<img id="bottom" src="bottom.png" alt="">
</body>
</html> |
|