create a web page that accepts form inputs for a root cause analysis document
- User
create a web page that accepts form inputs for a root cause analysis document
Assistant
Root Cause Analysis (RCA) Form Web Page
Here's a complete HTML web page that accepts form inputs for a Root Cause Analysis document:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Root Cause Analysis Form</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 20px; background-color: #f5f5f5; color: #333; } .container { max-width: 800px; margin: 0 auto; background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); } h1 { text-align: center; color: #2c3e50; margin-bottom: 30px; } .form-group { margin-bottom: 20px; } label { display: block; margin-bottom: 5px; font-weight: bold; } input[type="text"], input[type="date"], input[type="email"], textarea, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; } textarea { height: 100px; resize: vertical; } .section-header { background-color: #3498db; color: white; padding: 10px 15px; border-radius: 4px; margin-bottom: 15px; } button { background-color: #3498db; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 16px; display: block; margin: 30px auto 0; } button:hover { background-color: #2980b9; } .required { color: red; } </style> </head> <body> <div class="container"> <h1>Root Cause Analysis (RCA) Form</h1> <form id="rcaForm" action="#" method="post"> <!-- Basic Information Section --> <div class="section-header">Basic Information</div> <div class="form-group"> <label for="incidentTitle">Incident Title <span class="required">*</span></label> <input type="text" id="incidentTitle" name="incidentTitle" required> </div> <div class="form-group"> <label for="reportedBy">Reported By <span class="required">*</span></label> <input type="text" id="reportedBy" name="reportedBy" required> </div> <div class="form-group"> <label for="dateReported">Date Reported <span class="required">*</span></label> <input type="date" id="dateReported" name="dateReported" required> </div> <div class="form-group"> <label for="incidentDate">Incident Date <span class="required">*</span></label> <input type="date" id="incidentDate" name="incidentDate" required> </div> <div class="form-group"> <label for="location">Location</label> <input type="text" id="location" name="location"> </div> <!-- Incident Description Section --> <div class="section-header">Incident Description</div> <div class="form-group"> <label for="incidentDescription">Detailed Description of Incident <span class="required">*</span></label> <textarea id="incidentDescription" name="incidentDescription" required></textarea> </div> <div class="form-group"> <label for="impact">Impact of the Incident <span class="required">*</span></label> <textarea id="impact" name="impact" required></textarea> </div> <div class="form-group"> <label for="severity">Severity Level <span class="required">*</span></label> <select id="severity" name="severity" required> <option value="">Select Severity</option> <option value="low">Low</option> <option value="medium">Medium</option> <option value="high">High</option> <option value="critical">Critical</option> </select> </div> <!-- Root Cause Analysis Section --> <div class="section-header">Root Cause Analysis</div> <div class="form-group"> <label for="immediateCause">Immediate Cause</label> <textarea id="immediateCause" name="immediateCause"></textarea> </div> <div class="form-group"> <label for="rootCause">Root Cause <span class="required">*</span></label> <textarea id="rootCause" name="rootCause" required></textarea> </div> <div class="form-group"> <label for="analysisMethod">Analysis Method Used</label> <select id="analysisMethod" name="analysisMethod"> <option value="">Select Method</option> <option value="5-whys">5 Whys</option> <option value="fishbone">Fishbone Diagram</option> <option value="fmea">Failure Mode and Effects Analysis (FMEA)</option> <option value="other">Other</option> </select> </div> <!-- Corrective Actions Section --> <div class="section-header">Corrective Actions</div> <div class="form-group"> <label for="immediateActions">Immediate Actions Taken</label> <textarea id="immediateActions" name="immediateActions"></textarea> </div> <div class="form-group"> <label for="correctiveActions">Corrective Actions <span class="required">*</span></label> <textarea id="correctiveActions" name="correctiveActions" required></textarea> </div> <div class="form-group"> <label for="preventiveActions">Preventive Actions</label> <textarea id="preventiveActions" name="preventiveActions"></textarea> </div> <div class="form-group"> <label for="responsiblePerson">Responsible Person</label> <input type="text" id="responsiblePerson" name="responsiblePerson"> </div> <div class="form-group"> <label for="completionDate">Target Completion Date</label> <input type="date" id="completionDate" name="completionDate"> </div> <!-- Verification Section --> <div class="section-header">Verification</div> <div class="form-group"> <label for="verificationMethod">Verification Method</label> <textarea id="verificationMethod" name="verificationMethod"></textarea> </div> <div class="form-group"> <label for="verificationDate">Verification Date</label> <input type="date" id="verificationDate" name="verificationDate"> </div> <div class="form-group"> <label for="verifiedBy">Verified By</label> <input type="text" id="verifiedBy" name="verifiedBy"> </div> <button type="submit">Submit RCA</button> </form> </div> <script> document.getElementById('rcaForm').addEventListener('submit', function(e) { e.preventDefault(); // Here you would typically send the form data to a server // For this example, we'll just show an alert alert('RCA form submitted successfully!'); // In a real application, you might do something like: // const formData = new FormData(this); // fetch('/submit-rca', { // method: 'POST', // body: formData // }) // .then(response => response.json()) // .then(data => { // console.log('Success:', data); // alert('RCA submitted successfully!'); // }) // .catch(error => { // console.error('Error:', error); // alert('Error submitting RCA'); // }); }); </script> </body> </html>Features of this RCA Form:
-
Basic Information Section:
- Incident title, reporter details, dates, and location
-
Incident Description Section:
- Detailed description of the incident
- Impact assessment
- Severity level selection
-
Root Cause Analysis Section:
- Immediate cause identification
- Root cause determination
- Analysis method selection
-
Corrective Actions Section:
- Immediate actions taken
- Corrective actions planned
- Preventive measures
- Responsibility assignment and timelines
-
Verification Section:
- Verification methods and dates
- Verification personnel
-
Form Validation:
- Required fields marked with asterisks
- Basic client-side validation
-
Responsive Design:
- Works on different screen sizes
- Clean, professional appearance
To use this form, you would need to:
- Save it as an HTML file
- Open it in a web browser
- For actual submission, you would need to implement server-side processing (the JavaScript currently just shows an alert)
Would you like me to modify any specific part of this form or add additional fields?
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.