"Modal with tabbed content"
Bootstrap 2.3.2 Snippet by msurguy

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="span12"> <a data-toggle="modal" class="btn" href="#loginModal">Log in</a> <div class="modal hide" id="loginModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">✕</button> <h3>Login to Website</h3> </div> <div class="modal-body" style="text-align:center;"> <div class="row-fluid"> <div class="span10 offset1"> <div id="modalTab"> <div class="tab-content"> <div class="tab-pane active" id="login"> <form method="post" action='' name="login_form"> <p><input type="text" class="span12" name="eid" id="email" placeholder="Email"></p> <p><input type="password" class="span12" name="passwd" placeholder="Password"></p> <p><button type="submit" class="btn btn-primary">Sign in</button> <a href="#forgotpassword" data-toggle="tab">Forgot Password?</a> </p> </form> </div> <div class="tab-pane fade" id="forgotpassword"> <form method="post" action='' name="forgot_password"> <p>Hey this stuff happens, send us your email and we'll reset it for you!</p> <input type="text" class="span12" name="eid" id="email" placeholder="Email"> <p><button type="submit" class="btn btn-primary">Submit</button> <a href="#login" data-toggle="tab">Wait, I remember it now!</a> </p> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div>

Related: See More


Questions / Comments:

this is not working for me too. I`m using Bootstrap v3.3.4 and even changed "span" to "col-md-x" still not working.
Somebody help me.

César () - 3 years ago - Reply 0


I get it. Bootstrap v3.3.4.

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">

Launch demo modal

</button>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

<div class="modal-dialog">

<div class="modal-content">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

<h4 class="modal-title" id="myModalLabel">Modal title</h4>

</div>

<div class="modal-body">

<div class="tab-content">

<div id="sectionA" class="tab-pane fade in active">

<form method="post" action="" name="login_form">

<div class="form-group">

<input type="text" class="form-control" name="eid" id="email" placeholder="Email">

</div>

<div class="form-group">

<input type="password" class="form-control" name="passwd" placeholder="Password">

</div>

<button type="submit" class="btn btn-primary">Sign in</button>

Forgot Password?

</form>

</div>

<div id="sectionB" class="tab-pane fade">

<form method="post" action="" name="forgot_password">

<div class="form-group">

<input type="text" class="form-control" name="eid" id="email" placeholder="Email">

</div>

<button type="submit" class="btn btn-primary">Submit</button>

Wait, I remember it now!

</form>

</div>

</div>

</div>

<div class="modal-footer">

</div>

</div>

</div>

</div>

César () - 3 years ago - Reply 0


I have problems.
When i use modal on SiteMaster is display always lock, help me!

Thanh Bảo Nguyễn () - 4 years ago - Reply 0


how to use required?

hakan () - 4 years ago - Reply 0


Is there a way to trigger the modal to trigger on page load but only once per visitor?

benyates1 () - 4 years ago - Reply 0


You would have to use local storage or a cookie to set that in the browser's storage!

maxsurguy () - 4 years ago - Reply 0