Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <head>
  <!-- Required meta tags -->
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

  <!-- Bootstrap CSS -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" />

  <title>Bootstrap Form Tutorial</title>
</head>

<body class="container bg-light">
  <!-- Start Header form -->
  <div class="text-center pt-5">
    <img src="https://i.ibb.co/8cDgdFX/Logo.png" alt="network-logo" width="72" height="72" />
    <h2>Meeting Room Booking Form</h2>
    <p>
      Below is an example form built entirely with Bootstrap's form controls.
    </p>
  </div>
  <!-- End Header form -->

  <!-- Start Card -->
  <div class="card">
    <!-- Start Card Body -->
    <div class="card-body">
      <!-- Start Form -->
      <form id="bookingForm" action="#" method="" class="needs-validation" novalidate autocomplete="off">
        <!-- Start Input Name -->
        <div class="form-group">
          <label for="inputName">Name</label>
          <input type="text" class="form-control" id="inputName" name="name" placeholder="Your name" required />
          <small class="form-text text-muted">Please fill your name</small>
        </div>
        <!-- End Input Name -->

        <!-- Start Input Email -->
        <div class="form-group">
          <label for="inputEmail">Email</label>
          <input type="email" class="form-control" id="inputEmail" name="email" placeholder="Enter email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" required />
          <small class="form-text text-muted">We'll never share your email with anyone else.</small>
        </div>
        <!-- End Input Email -->

        <!-- Start Input Telephone -->
        <div class="form-group">
          <label for="inputPhone">Phone</label>
          <input type="tel" class="form-control" id="inputPhone" name="phone" placeholder="099xxxxxxx" pattern="\d{3}\d{3}\d{4}" required />
          <small class="form-text text-muted">We'll never share your phone number with anyone else.</small>
        </div>
        <!-- End Input Telephone -->

        <!-- Start Input Date , Start Time and End Time -->
        <div class="form-row">
          <!-- Start Input Date -->
          <div class="form-group col-md-4">
            <label for="inputDate">Date</label>
            <input type="date" class="form-control" id="inputDate" name="date" required />
            <small class="form-text text-muted">Please choose date and time for meeting.</small>
          </div>
          <!-- End Input Date -->

          <!-- Start Input Start Time -->
          <div class="form-group col-md-4">
            <label>Start Time</label>
            <div class="d-flex flex-row justify-content-between align-items-center">
              <select class="form-control mr-1" id="inputStartTimeHour" name="startHour" required>
                <option value="" disabled selected>Hour</option>
                <option value="08">08</option>
                <option value="09">09</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
              </select>
              <div class="pl-1 pr-2">:</div>
              <select class="form-control" id="inputStartTimeMinute" name="startMinute" required>
                <option value="" disabled selected>Min</option>
                <option value="00">00</option>
                <option value="00">30</option>
              </select>
            </div>
          </div>
          <!-- End Input Start Time -->

          <!-- Start Input End Time -->
          <div class="form-group col-md-4">
            <label>End Time</label>
            <div class="d-flex flex-row justify-content-between align-items-center">
              <select class="form-control mr-1" id="inputEndTimeHour" name="endHour" required>
                <option value="" disabled selected>Hour</option>
                <option value="09">09</option>
                <option value="10">10</option>
                <option value="11">11</option>
                <option value="12">12</option>
                <option value="13">13</option>
                <option value="14">14</option>
                <option value="15">15</option>
                <option value="16">16</option>
              </select>
              <div class="pl-1 pr-2">:</div>
              <select class="form-control" id="inputEndTimeMinute" name="endMinute" required>
                <option value="" disabled selected>Min</option>
                <option value="00">00</option>
                <option value="00">30</option>
              </select>
            </div>
          </div>
          <!-- End Input End Time -->
        </div>
        <!-- End Input Date , Start Time and End Time -->

        <!-- Start Check Room Type -->
        <div class="form-group">
          <legend class="col-form-label pt-0">Choose a Room</legend>
          <div class="form-check form-check-inline">
            <input type="radio" class="form-check-input" id="inlineRadioType1" name="roomType" value="type1" required />
            <label class="form-check-label" for="inlineRadioType1">Room 1 (10 People)</label>
          </div>
          <div class="form-check form-check-inline">
            <input type="radio" class="form-check-input" id="inlineRadioType2" name="roomType" value="type2" required />
            <label class="form-check-label" for="inlineRadioType2">Room 2 (20 People)</label>
          </div>
          <div class="form-check form-check-inline">
            <input type="radio" class="form-check-input" id="inlineRadioType3" name="roomType" value="type3" required />
            <label class="form-check-label" for="inlineRadioType3">Room 3 (30 People)</label>
          </div>
          <div class="form-check form-check-inline">
            <input type="radio" class="form-check-input" id="inlineRadioType4" name="roomType" value="type4" required />
            <label class="form-check-label" for="inlineRadioType4">Room 4 (40 People)</label>
          </div>
        </div>
        <!-- End Check Room Type -->

        <hr />

        <!-- Start Check Snack Type -->
        <div class="form-row">
          <legend class="col-form-label pb-3">Snack and Drink</legend>
          <div class="row px-1">
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/k4tBpTp/snack-set-1.jpg" alt="snack-box-set-1" class="img-thumbnail" />
              <br />
              <label for=" inputSnack1">Sandwich Set 1</label>
              <input type="number" class="form-control" id="inputSnack1" name="snack1" min="0" max="40" />
              <small class="form-text text-muted">Crabstick Sandwich.</small>
            </div>
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/DW0cv1s/snack-set-2.jpg" alt="snack-box-set-2" class="img-thumbnail" />
              <br />
              <label for="inputSnack2">Sandwich Set 2</label>
              <input type="number" class="form-control" id="inputSnack2" name="snack2" min="0" max="40" />
              <small class="form-text text-muted">Tuna Sandwich.</small>
            </div>
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/YdZF2Q8/snack-set-3.jpg" alt="snack-box-set-3" class="img-thumbnail" />
              <br />
              <label for="inputSnack3">Sandwich Set 3</label>
              <input type="number" class="form-control" id="inputSnack3" name="snack3" min="0" max="40" />
              <small class="form-text text-muted">Crab Roll Sandwich.</small>
            </div>
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/6mZ2zb0/snack-set-4.jpg" alt="snack-box-set-4" class="img-thumbnail" />
              <br />
              <label for="inputSnack4">Sandwich Set 4</label>
              <input type="number" class="form-control" id="inputSnack4" name="snack4" min="0" max="40" />
              <small class="form-text text-muted">Tuna Sandwich.</small>
            </div>
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/1rsRBD1/snack-set-5.jpg" alt="snack-box-set-5" class="img-thumbnail" />
              <br />
              <label for="inputSnack5">Sandwich Set 5</label>
              <input type="number" class="form-control" id="inputSnack5" name="snack5" min="0" max="40" />
              <small class="form-text text-muted">Ham Sandwich.</small>
            </div>
            <div class="form-group col-lg-2 col-md-3 col-sm-4 col-6">
              <img src="https://i.ibb.co/PhR8YDN/snack-set-6.jpg" alt="snack-box-set-6" class="img-thumbnail" />
              <br />
              <label for="inputSnack5">Sandwich Set 6</label>
              <input type="number" class="form-control" id="inputSnack6" name="snack6" min="0" max="40" />
              <small class="form-text text-muted">Roast Pork Bun.</small>
            </div>
          </div>
        </div>
        <!-- End Check Snack Type -->

        <!-- Start Input Remark -->
        <div class="form-group">
          <label for="textAreaRemark">Notes</label>
          <textarea class="form-control" name="remark" id="textAreaRemark" rows="2" placeholder="Tell us you want more..."></textarea>
        </div>
        <!-- End Input Remark -->

        <!-- Start Submit Button -->
        <button class="btn btn-primary btn-block col-lg-2" type="submit">Submit</button>
        <!-- End Submit Button -->
      </form>
      <!-- End Form -->
    </div>
    <!-- End Card Body -->
  </div>
  <!-- End Card -->
  <footer>
    <div class="my-4 text-muted text-center">
      <p>© My Company</p>
    </div>
  </footer>

  <!-- Optional JavaScript -->
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

  <!-- Start Scritp for Form -->
  <script>
    // Example starter JavaScript for disabling form submissions if there are invalid fields
    (function() {
      'use strict';
      window.addEventListener('load', function() {
        // Fetch all the forms we want to apply custom Bootstrap validation styles to
        var forms = document.getElementsByClassName('needs-validation');
        // Loop over them and prevent submission
        var validation = Array.prototype.filter.call(forms, function(form) {
          form.addEventListener('submit', function(event) {
            if (form.checkValidity() === false) {
              event.preventDefault();
              event.stopPropagation();
            }
            form.classList.add('was-validated');
          }, false);
        });
      }, false);
    })();
  </script>
  <!-- End Scritp for Form -->

</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                // Example starter JavaScript for disabling form submissions if there are invalid fields
(function () {
  "use strict";
  window.addEventListener(
    "load",
    function () {
      // Fetch all the forms we want to apply custom Bootstrap validation styles to
      var forms = document.getElementsByClassName("needs-validation");
      // Loop over them and prevent submission
      var validation = Array.prototype.filter.call(forms, function (form) {
        form.addEventListener(
          "submit",
          function (event) {
            if (form.checkValidity() === false) {
              event.preventDefault();
              event.stopPropagation();
            }
            form.classList.add("was-validated");
          },
          false
        );
      });
    },
    false
  );
})();

              
            
!
999px

Console