131 lines
4.9 KiB
PHP
131 lines
4.9 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="record.css">
|
|
</head>
|
|
<script>
|
|
function addRow() {
|
|
let container = document.getElementById("fieldContainer");
|
|
let row = document.createElement("div");
|
|
row.className = "input-group mb-2 filedRow";
|
|
row.innerHTML =
|
|
|
|
'<input type="text" name = "row[]" class="form-control" placeholder="Field 1 - Row 1">'+
|
|
|
|
'<button type="button" class="btn btn-danger ms-2 " onclick="removeRow(this)">Delete</button>';
|
|
|
|
container.appendChild(row);
|
|
|
|
}
|
|
function removeRow(btn)
|
|
{
|
|
btn.parentElement.remove();
|
|
}
|
|
</script>
|
|
<body>
|
|
|
|
<nav class="navbar custom-navbar bg-light padding sticky-top">
|
|
<div class="container-fluid d-flex align-items-center">
|
|
|
|
<!-- Logo -->
|
|
<a href="index.php" class="logo d-flex align-items-center text-decoration-none text-dark">
|
|
<span class="logo-icon">C</span>
|
|
<span class="logo-text">CRUD Manager</span>
|
|
</a>
|
|
|
|
|
|
<!-- Search -->
|
|
<div class="search-area ">
|
|
<i class="fa fa-search search-icon"></i>
|
|
<input type="text" class="search-box" placeholder="Search anything...">
|
|
</div>
|
|
|
|
<!-- Right Buttons -->
|
|
<div class="nav-links d-flex align-items-center gap-3">
|
|
<a href="index.php" class="btn btn-dark">Home</a>
|
|
<a href="manage_records.php" class="btn btn-outline-dark">View Records</a>
|
|
<div class="profile">👤</div>
|
|
</div>
|
|
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container form-container">
|
|
<div class="card">
|
|
<h5>Create New Record</h5>
|
|
<p class="text-muted">Fill in the form below to create a new record</p>
|
|
|
|
<form autocomplete="off" method="post" action="formaction.php">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<label for="name">Name</label>
|
|
<input type="text" name="name" class="form-control" required placeholder="Enter full name ">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="email">Email</label><br>
|
|
<input type="text" name="email" class="form-control" required placeholder="email@example.com">
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3">
|
|
<div class="col-md-6">
|
|
<label for="phone">Phone</label>
|
|
<input type="number" name="phone" class="form-control" placeholder="+1(555)000-0000"><br>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="category">Category</label>
|
|
<select name="category" id="category" class="form-control">
|
|
<option value="General">General</option>
|
|
<option value="General">SC</option>
|
|
<option value="General">ST</option>
|
|
<option value="General">OBC</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="mt-3">
|
|
<label for="status">Status</label>
|
|
<select name="status" id="status" class="form-control">
|
|
<option value="active">Active</option>
|
|
<option value="inactive">Inactive</option>
|
|
</select>
|
|
</div>
|
|
<br>
|
|
<div class="mt-3">
|
|
<label for="name" >Description</label>
|
|
<textarea name="description" id="description" class="form-control" rows="3" placeholder="Add my additional notes or detaiuls... "></textarea>
|
|
</div>
|
|
|
|
<div class="fields mt-4">
|
|
<div class="header">
|
|
<div>
|
|
<h5>Additional Fields</h5>
|
|
<p class="text-muted">Add multiple rows of custom data </p>
|
|
|
|
|
|
|
|
<div id="fieldContainer">
|
|
<div class="input-group mb-2">
|
|
<input type="text" name= "row[]" class="form-control" placeholder="Field 1 - Row 1">
|
|
<button type="button" class="btn btn-danger ms-2" onclick="removeRow(this)">Delete</button>
|
|
|
|
</div>
|
|
</div>
|
|
<button type="button" class="btn btn-sm btn-outline-dark mt-2" onclick="addRow()">Add Row</button>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="form-action mt-4">
|
|
<button type="button" class="btn btn-outline-secondary">Cancel</button>
|
|
<button type="submit" class="btn btn-dark">Create Record</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |