Advertisement
hsianghui

add_customer_form.ejs (Exercise 1)

Feb 18th, 2025
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.85 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.   <head>
  4.     <meta charset="UTF-8" />
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6.     <link
  7.      href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
  8.      rel="stylesheet"
  9.    />
  10.     <title>Create A New Customer</title>
  11.   </head>
  12.  
  13.   <body>
  14.     <div class="container" style="margin-top: 20px">
  15.       <div style="float:left; width: 200px; padding-left: 10px;">
  16.         <ul style="list-style-type: none; padding: 0;">
  17.           <li><a href="/customers/new">Create A New Customer</a></li>
  18.           <li><a href="/customers/list">List Customers</a></li>
  19.         </ul>
  20.       </div>  
  21.       <!-- Include the sidebar.ejs file -->
  22.       <div style="float: left">
  23.         <h1>Create A New Customer</h1>
  24.         <form action="/customers/add" method="post">
  25.           <div class="mb-3 row">
  26.             <label for="name" class="col-sm-4 col-form-label">Name:</label>
  27.             <div class="col-sm-8">
  28.               <input
  29.                type="text"
  30.                class="form-control"
  31.                id="name"
  32.                name="name"
  33.                required
  34.              />
  35.             </div>
  36.           </div>
  37.           <div class="mb-3 row">
  38.             <div class="col-sm-4 col-form-label">Gender:</div>
  39.             <div class="col-sm-8">
  40.               <input
  41.                type="radio"
  42.                class="form-check-input"
  43.                name="gender"
  44.                value="1"
  45.                id="female"
  46.                checked
  47.              />
  48.               <label for="female" class="form-check-label">Female</label>
  49.               <input
  50.                type="radio"
  51.                class="form-check-input"
  52.                name="gender"
  53.                value="2"
  54.                id="male"
  55.              />
  56.               <label for="male" class="form-check-label">Male</label>
  57.             </div>
  58.           </div>
  59.           <div class="mb-3 row">
  60.             <label for="dob" class="col-sm-4 col-form-label"
  61.              >Date of Birth <br />
  62.               (yyyy-mm-dd):</label
  63.            >
  64.             <div class="col-sm-8">
  65.               <input
  66.                type="text"
  67.                class="form-control"
  68.                id="dob"
  69.                name="dob"
  70.                required
  71.              />
  72.             </div>
  73.           </div>
  74.           <div class="mb-3 row">
  75.             <div class="col-6">
  76.               <a href="/customers/list" class="btn btn-secondary">Cancel</a>
  77.             </div>
  78.             <div class="col-6 text-end">
  79.               <input class="btn btn-primary" type="submit" value="Submit" />
  80.             </div>
  81.           </div>
  82.         </form>
  83.       </div>
  84.     </div>
  85.  
  86.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  87.   </body>
  88. </html>
  89.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement