Bootstrap 4 Form Tutorials

bootstrap 4 form example
bootstrap 4 form example
Bootstrap 4 form example

Hello friends today in this article we will learn Bootstrap 4 form , Bootstrap 4 form template , Bootstrap 4 form validation with examples and tutorials.

There are two types of bootstrap 4 form 1- Stacked form (full-width), 2- Inline Form

1- Stacked form (full-width)

<div class="container">
  <form action="/submit.php">
    <div class="form-group">
     <label for="email">Email address:</label>
     <input type="email" class="form-control" placeholder="Enter email" id="email">
    </div>
    <div class="form-group">
     <label for="pwd">Password:</label>
     <input type="password" class="form-control" placeholder="Enter password" id="pwd">
    </div>
   <button type="submit" class="btn btn-primary">Submit</button>
  </form>
  </div>

2- Bootstrap 4 Inline Form

To Create form in one line we use class . form-inline to add in form.

<form class="form-inline" action="/submit.php">
    <div class="form-group">
     <label for="email">Username:</label>
     <input type="email" class="form-control" placeholder="Enter email" id="email">
    </div>
    <div class="form-group">
     <label for="pwd">Password:</label>
     <input type="password" class="form-control" placeholder="Enter password" id="pwd">
    </div>
   <button type="submit" class="btn btn-primary">LOGIN</button>
  </form>

Bootstrap 4 Form Validation

Leave a Reply

Your email address will not be published. Required fields are marked *