Bootstrap login form in modal

Bootstrap login form in modal Login form is used to get the login details from users, now a days it is very popular to use
the modal to show the login form in bootatrap modal. Here in this tutorial we are going to explain how you can create login form in bootstrap
modal. You can also use our online editor to edit and run the code online.

Bootstrap login form in modal Example

Let us create very basic login form in bootstrap modal, In this example modal will contain a login form with login inputs, it also contains the other related links for login or registration.

Create login form in Bootstrap modal Example:

<title>Bootstrap Login Form in Modal</title>
<link rel="stylesheet" href="">
<script src=""></script>
<!-- Latest compiled and minified JavaScript -->
<script src=""></script>
/* custom css style starts here */
 background: #880e4f;

  <!----modal starts here--->
<div id="tutorialsplaneModal" class="modal fade" role='dialog'>
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header login-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">X</button>
                <h4 class="modal-title">Login</h4>
            <div class="modal-body">
              <!---login form starts here-->
                   <form role="form">
			<div class="form-group">
			<label for="email">Email</label>
			<input type="text" name= "email" class="form-control" id="email"
			placeholder="Enter Email">
			<div class="form-group">
			<label for="password">Password</label>
			<input type="password" name="password" class="form-control" id="password"
			placeholder="Enter Password">
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">Sign In</button>
             <div class="row">
                  <div class="col-xs-7 col-sm-7 col-md-7">
                    <a href="#" class="btn btn-link">Forgot Password?</a>
                  <div class="col-xs-4 col-sm-4 col-md-4">
                  <a href="#" class="btn btn-link">Register</a>
<!--Modal ends here--->
<!----add button to trigger the modal---->
<button type="button" class="btn btn-link" data-toggle="modal" data-target="#tutorialsplaneModal">Click Here To Open Modal</button>


Try it »

We have added custom css to add the modal color on the same way you can customize the login form, if you need more customization create a css file and write the custom styles in it and include it in this page.
If you run the above example it will produce the output something like this –

Bootstrap login form in modal download


Add Comment

📖 Read More