-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanroom.html
90 lines (78 loc) · 3.53 KB
/
cleanroom.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
.repeatable {
border: 1px solid red;
margin: 5px;
padding: 5px;
}
.repeatable-list {
border: 1px dotted blue;
margin: 5px;
padding: 5px;
}
.repeatable-section {
border: 1px dashed green;
margin: 5px;
padding: 5px;
}
</style>
</head>
<body>
<form>
<div class="repeatable" data-index-rx="([^\[]+\[)(\d+)(\].*)">
<div class="repeatable-list">
<div class="repeatable-section">
<label for="top[0]alpha">Alpha</label>
<input class="form-control" type="text" name="top[0]alpha" id="top[0]alpha"><br>
<div class="repeatable" data-index-rx="([^\[]+\[\d+\][^\[]+\[)(\d+)(\].*)">
<div class="repeatable-list">
<div class="repeatable-section">
<label for="top[0]gamma[0]">Gamma</label>
<input class="form-control" type="text" name="top[0]gamma[0]" id="top[0]gamma[0]"><br>
<div class="repeatable" data-index-rx="([^\[]+\[\d+\][^\[]+\[\d+\][^\[]+\[)(\d+)(\].*)">
<div class="repeatable-list">
<div class="repeatable-section">
<label for="top[0]gamma[0]omega[0]">Omega</label>
<input class="form-control" type="text" name="top[0]gamma[0]omega[0]" id="top[0]gamma[0]omega[0]"><br>
<label for="top[0]gamma[0]zeta[0]">Zeta</label>
<input class="form-control" type="text" name="top[0]gamma[0]zeta[0]" id="top[0]gamma[0]zeta[0]"><br>
<button class="remove">Remove</button>
</div>
</div>
<button class="add">Add</button>
</div>
<label for="top[0]delta[0]">Delta</label>
<input class="form-control" type="text" name="top[0]delta[0]" id="top[0]delta[0]"><br>
<button class="remove">Remove</button>
</div>
</div>
<button class="add">Add</button>
</div>
<label for="top[0]beta">Beta</label>
<input class="form-control" type="text" name="top[0]beta" id="top[0]beta"><br>
<button class="remove">Remove</button>
</div>
</div>
<button class="add">Add</button>
</div>
</form>
<script type="text/javascript" src="jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="repeater.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
repeater.init({
repeatableSelector: ".repeatable",
repeatableList: ".repeatable-list",
repeatableSection: ".repeatable-section",
removeSelector: ".remove",
addSelector: ".add",
formControl: ".form-control"
});
});
</script>
</body>
</html>