-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.js
More file actions
27 lines (22 loc) · 1.21 KB
/
form.js
File metadata and controls
27 lines (22 loc) · 1.21 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
document.getElementById('task_form').addEventListener('submit', function(e) {
e.preventDefault();
let firstName = document.getElementById('firstName').value;
let lastName = document.getElementById('lastName').value;
let managerFirstName = document.getElementById('managerFirstName').value;
let managerLastName = document.getElementById('managerLastName').value;
let taskName = document.getElementById('taskName').value;
let taskId = document.getElementById('taskId').value;
let status = document.querySelector('input[name="Status"]:checked').value;
let notes = document.getElementById('notes').value;
let instructions = document.getElementById('instructions').value;
let submittedData = document.getElementById('submittedData');
submittedData.innerHTML = `
<h2>Submitted Data</h2>
<p><strong>Employee Name:</strong> ${firstName} ${lastName}</p>
<p><strong>Manager Name:</strong> ${managerFirstName} ${managerLastName}</p>
<p><strong>Task ID:</strong> ${taskId}</p>
<p><strong>Status:</strong> ${status}</p>
<p><strong>Additional Notes:</strong> ${notes}</p>
<p><strong>Instructions:</strong> ${instructions}</p>
`;
});