-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo_form.html
More file actions
169 lines (148 loc) · 4.55 KB
/
Copy pathdemo_form.html
File metadata and controls
169 lines (148 loc) · 4.55 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Learning & Development Demo Form</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f3f4f6;
margin: 0;
padding: 20px;
}
.card {
background: white;
border-radius: 6px;
box-shadow: 0 3px 8px rgba(0,0,0,0.15);
margin: 0 auto;
width: 90%;
padding: 0;
}
.card-header {
background: #3B5998;
color: white;
padding: 15px;
border-radius: 6px 6px 0 0;
}
.card-title {
margin: 0;
font-size: 20px;
font-weight: bold;
}
.card-body {
padding: 20px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
background: white;
}
th {
background: #e2e8f0;
padding: 8px;
text-align: center;
font-size: 14px;
}
td {
padding: 6px;
border-bottom: 1px solid #e5e7eb;
}
input, select {
width: 100%;
padding: 5px;
font-size: 14px;
}
.btn-add {
background: #2563eb;
color: white;
border: none;
padding: 8px 14px;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
}
.btn-del {
background: #dc2626;
color: white;
border: none;
padding: 4px 8px;
border-radius: 4px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="card">
<div class="card-header">
<h3 class="card-title">Learning and Development (L&D) Interventions / Training Programs Attended</h3>
</div>
<div class="card-body">
<table id="ld-table">
<thead>
<tr>
<th rowspan="2">Title</th>
<th colspan="2">Inclusive Dates</th>
<th rowspan="2">Hours</th>
<th rowspan="2">Type of L&D</th>
<th rowspan="2">Conducted / Sponsored By</th>
<th rowspan="2">Action</th>
</tr>
<tr>
<th>From</th>
<th>To</th>
</tr>
</thead>
<tbody id="learning-table-tbody">
<tr>
<td><input type="text" name="LD_title"></td>
<td><input type="date" name="LD_from"></td>
<td><input type="date" name="LD_to"></td>
<td><input type="text" name="LD_hours_number"></td>
<td>
<select name="LD_type">
<option value="">-SELECT-</option>
<option value="Managerial">Managerial</option>
<option value="Supervisory">Supervisory</option>
<option value="Technical">Technical</option>
<option value="Administrative">Administrative</option>
</select>
</td>
<td><input type="text" name="LD_conducted_by"></td>
<td><button class="btn-del" onclick="deleteRow(this)">X</button></td>
</tr>
</tbody>
</table>
<button class="btn-add" onclick="addRow()">+ Add Row</button>
</div>
</div>
<script>
function addRow() {
const tbody = document.getElementById("learning-table-tbody");
const tr = document.createElement("tr");
tr.innerHTML = `
<td><input type="text" name="LD_title"></td>
<td><input type="date" name="LD_from"></td>
<td><input type="date" name="LD_to"></td>
<td><input type="text" name="LD_hours_number"></td>
<td>
<select name="LD_type">
<option value="">-SELECT-</option>
<option value="Managerial">Managerial</option>
<option value="Supervisory">Supervisory</option>
<option value="Technical">Technical</option>
<option value="Administrative">Administrative</option>
</select>
</td>
<td><input type="text" name="LD_conducted_by"></td>
<td><button class="btn-del" onclick="deleteRow(this)">X</button></td>
`;
tbody.appendChild(tr);
}
function deleteRow(btn) {
const row = btn.parentNode.parentNode;
row.remove();
}
</script>
</body>
</html>