Modal window not closing from button - html

I am using a custom modal window with a form and cannot close the window from a button. I have tried various options of data-dismiss but still not working. I am launching the modal from a menu click on within a li element like so:
<li>Contact</li>
Is this correct?
I am also confused as to why the window closes when the ;times x is clicked. As I am a new user to html5 I would be grateful if someone could help with this. many thanks
Bootstrap v3.3.7
html
<div class="modal" id="modal" role="dialog">
<div class="modal__dialog">
<section class="modal__content">
<header class="modal__header">
<h2 class="modal__title"><div style="margin: 0 0 0 30px;">Contact Us</div></h2>
<div style="margin: 4px 0 0 34px; color: white;">If you need to contact us, please use this form and we shall respond as soon as possible. Thanks</div>
×
</header>
<div class="modal__body">
<div class="content-block contact-3">
<div class="container">
<div class="row">
<div class="col-md-8">
<div id="contact" class="form-container">
<fieldset>
<div id="message"></div>
<form method="post" action="js/contact-form.php" name="contactform" id="contactform">
<div class="form-group">
<input name="name" id="name" type="text" value="" placeholder="Name" class="form-control" />
</div>
<div class="form-group">
<input name="email" id="email" type="text" value="" placeholder="Email" class="form-control" />
</div>
<div class="form-group">
<input name="phone" id="phone" type="text" value="" placeholder="Phone" class="form-control" />
</div>
<div class="form-group">
<textarea name="comments" id="comments" class="form-control" rows="3" placeholder="Message" id="textArea"></textarea>
<div class="editContent">
<p class="small text-muted"><span class="guardsman">* All fields are required.</span> Once we receive your message we will respond as soon as possible.</p>
</div>
</div>
<div class="form-group">
<button class="btn btn-default" type="button" class="modal" data-dismiss="modal">Close</button>
<button class="btn btn-primary" type="submit" id="cf-submit" name="submit">Send</button>
</div>
</form>
</fieldset>
</div>
<!-- /.form-container -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<!--// END Contact 3-1 -->
</div>
</section>
</div>

You need to add data-toggle="modal" and data-target="#modal" attributes to your link.
You need to add data-dismiss="modal" attribute to your close link.
See my fiddle and read the documentation:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet" />
<li><a data-toggle="modal" data-target="#modal">Contact</a></li>
<div class="modal" id="modal" role="dialog">
<div class="modal__dialog">
<section class="modal__content">
<header class="modal__header">
<h2 class="modal__title">
<div style="margin: 0 0 0 30px;">Contact Us</div>
</h2>
<div style="margin: 4px 0 0 34px; color: white;">If you need to contact us, please use this form and we shall respond as soon as possible. Thanks</div>
×
</header>
<div class="modal__body">
<div class="content-block contact-3">
<div class="container">
<div class="row">
<div class="col-md-8">
<div id="contact" class="form-container">
<fieldset>
<div id="message"></div>
<form method="post" action="js/contact-form.php" name="contactform" id="contactform">
<div class="form-group">
<input name="name" id="name" type="text" value="" placeholder="Name" class="form-control" />
</div>
<div class="form-group">
<input name="email" id="email" type="text" value="" placeholder="Email" class="form-control" />
</div>
<div class="form-group">
<input name="phone" id="phone" type="text" value="" placeholder="Phone" class="form-control" />
</div>
<div class="form-group">
<textarea name="comments" id="comments" class="form-control" rows="3" placeholder="Message" id="textArea"></textarea>
<div class="editContent">
<p class="small text-muted"><span class="guardsman">* All fields are required.</span> Once we receive your message we will respond as soon as possible.</p>
</div>
</div>
<div class="form-group">
<button class="btn btn-default" type="button" class="modal" data-dismiss="modal">Close</button>
<button class="btn btn-primary" type="submit" id="cf-submit" name="submit">Send</button>
</div>
</form>
</fieldset>
</div>
<!-- /.form-container -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<!--// END Contact 3-1 -->
</div>
</section>
</div>

The reference in calling the modal seems to be wrong. Other than that, modal is working perfectly. Try this snippet.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="row text-center">
Contact
</div>
<div class="modal fade" id="largeModal" tabindex="-1" role="dialog" aria-labelledby="largeModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h2 class="modal__title">
<div style="margin: 0 0 0 30px;">Contact Us</div>
</h2>
<div style="margin: 4px 0 0 34px; color: white;">If you need to contact us, please use this form and we shall respond as soon as possible. Thanks</div>
</div>
<div class="modal-body">
<div class="content-block contact-3">
<div class="container">
<div class="row">
<div class="col-md-8">
<div id="contact" class="form-container">
<fieldset>
<div id="message"></div>
<form method="post" action="js/contact-form.php" name="contactform" id="contactform">
<div class="form-group">
<input name="name" id="name" type="text" value="" placeholder="Name" class="form-control" />
</div>
<div class="form-group">
<input name="email" id="email" type="text" value="" placeholder="Email" class="form-control" />
</div>
<div class="form-group">
<input name="phone" id="phone" type="text" value="" placeholder="Phone" class="form-control" />
</div>
<div class="form-group">
<textarea name="comments" id="comments" class="form-control" rows="3" placeholder="Message" id="textArea"></textarea>
<div class="editContent">
<p class="small text-muted"><span class="guardsman">* All fields are required.</span> Once we receive your message we will respond as soon as possible.</p>
</div>
</div>
<div class="form-group">
<button class="btn btn-default" type="button" class="modal" data-dismiss="modal">Close</button>
<button class="btn btn-primary" type="submit" id="cf-submit" name="submit">Send</button>
</div>
</form>
</fieldset>
</div>
<!-- /.form-container -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

If you are using bootstrap modals you can read their docs. You are using the example buttons:
<div class="form-group">
<button class="btn btn-default" type="button" class="modal" data-dismiss="modal">Close</button>
<button class="btn btn-primary" type="submit" id="cf-submit" name="submit">Send</button>
</div>
The data-dismiss="modal" is what makes the modal to close, so you could make your link like this:
×

Related

How can I get my third party script to correctly function on my website?

When the user fills out my form and clicks on the button “Generate CV”. The HTML form should automatically download as a PDF to the users download folder.
Problem one:
I tried using this third party plugin but can't get it to function correctly as when I click on the <a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a> button nothing happens. How can I get this to work?
Inspect errors
Problem two:
How can I get this button <a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a> to look like <input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV"> I did use the same class. However, I think that class information in bootstrap only applies to the <input> tag so how can I get around this issue?
Below is my current code
<!-- Form-->
<section class="module bg-gray text-center divider-bottom p-3">
<div class="container">
<div class="row">
<div class="col-md-12">
<form id="contact-form" method="post" novalidate>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="name" placeholder="Name (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="E-mail (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="subject" placeholder="Mobile Number (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Education History (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Previous Employers (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Personal Skills / Hobbies (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<p></p>
<div class="text-center">
<input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV">
<a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">Generate CV</a>
</div>
</div>
</div>
</form>
<!-- Ajax response-->
<div class="ajax-response text-center" id="contact-response"></div>
</div>
</div>
</div>
</section>
<!-- Form end-->
Here is the location of where I put the third party script.
<!-- Scripts-->
<script src="assets/js/custom/jquery-3.2.1.min.js"></script>
<script src="assets/js/custom/popper.min.js"></script>
<script src="assets/js/bootstrap/bootstrap.min.js"></script>
<script src="assets/js/custom/plugins.min.js"></script>
<script type="text/javascript" src="http://www.pdfmyform.com/js/pdfmyform.js"></script>
<script src="assets/js/custom/custom.min.js"></script>
</html>
</body>
FULL WEBPAGE CODE BELOW IF REQUIRED
<!-- Form-->
<section class="module bg-gray text-center divider-bottom p-3">
<div class="container">
<div class="row">
<div class="col-md-12">
<form id="contact-form" method="post" novalidate>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="name" placeholder="Name (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="E-mail (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<input class="form-control" type="text" name="subject" placeholder="Mobile Number (Click Me)" required="">
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Education History (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Previous Employers (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="message" placeholder="Personal Skills / Hobbies (Click Me)" rows="12" required=""></textarea>
</div>
</div>
<div class="col-md-12">
<p></p>
<div class="text-center">
<input class="btn btn-circle btn-outline-brand" type="submit" value="Generate CV">
<a class"btn btn-circle btn-outline-brand" onclick="pdfmyform(this);" href="#">PDF this page!</a>
</div>
</div>
</div>
</form>
<!-- Ajax response-->
<div class="ajax-response text-center" id="contact-response"></div>
</div>
</div>
</div>
</section>
<!-- Form end-->
<!-- Copyright -->
<div class="footer-copyright text-center text-black py-3">© Copyright 2018 Handcrafted By Zeplur. All Rights Reserved |
Terms and conditions
</div>
<!-- To top button--><a class="scroll-top" href="#top"><i class="fas fa-angle-up"></i></a>
<!-- Scripts-->
<script src="assets/js/custom/jquery-3.2.1.min.js"></script>
<script src="assets/js/custom/popper.min.js"></script>
<script src="assets/js/bootstrap/bootstrap.min.js"></script>
<script src="assets/js/custom/plugins.min.js"></script>
<script type="text/javascript" src="http://www.pdfmyform.com/js/pdfmyform.js"></script>
<script src="assets/js/custom/custom.min.js"></script>
</body>
</html>
It looks like your code is fine. But as you can see in the inspect view, errors clearly say that the local resources can not be loaded.
Problem 1 - pdfmyform() is not allowed to read local resources.
Once you host the code with a proper website or a local web(http) server, this should work fine.

Boostrap automatically stacking forms instead of replacing in modal.

I am trying to set up a modal with tabs in it. This is for login/signup. However, instead of just substituting the the sign up form when it is clicked, it just stacks it below the login form. Bootply link: http://www.bootply.com/5ssZsWHIzv
Any help would be much appreciated!
Your col-md-6 class is in a wrong place, you should nest the two column outside of the tab content div. I've modified the code.
Bootply: http://www.bootply.com/fE04YpZxgN
<button class="btn btn-primary btn-sm" href="#signup" data-toggle="modal" data-target=".bs-modal-sm" style="margin-top: 10px">Sign In/Register
</button>
<div class="modal fade bs-modal-sm" id="signupModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content clearfix">
<br>
<div class="bs-example bs-example-tabs">
<ul id="myTab" class="nav nav-tabs">
<li class="active">Sign In</li>
<li class="">Register</li>
</ul>
</div>
<div class="modal-body">
<div class="col-md-6">
<div id="myTabContent row" class="tab-content">
<div role="tabpanel" class="tab-pane fade active in" id="signinTab">
<form class="form-horizontal" id="loginForm">
<fieldset>
<!-- Sign In Form -->
<!-- Text input-->
<div id="loginErrors">
</div>
<div class="control-group">
<label class="control-label" for="loginEmail">Email:</label>
<div class="controls">
<input id="loginEmail" name="email" type="text" class="form-control" placeholder="username#example.com">
</div>
</div>
<!-- Password input-->
<div class="control-group">
<label class="control-label" for="passwordinput">Password:</label>
<div class="controls">
<input id="passwordinput" name="passwordinput" class="form-control" type="password" placeholder="********">
</div>
</div>
<!-- Button -->
<div class="control-group">
<label class="control-label" for="signin"></label>
<div class="controls">
<div class="btn-toolbar">
<button id="signin" name="signin" class="btn btn-success">Sign In
</button>
<button type="button" id="closeModal" class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</fieldset>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="signup">
<form class="form-horizontal" id="signUpForm">
<fieldset>
<!-- Sign Up Form -->
<div id="signUpErrors">
</div>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="Email">Email:</label>
<div class="controls">
<input id="Email" name="Email" class="form-control" type="text" placeholder="example#example.com">
</div>
</div>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="userid">First Name:</label>
<div class="controls">
<input id="firstName" name="firstName" class="form-control" type="text" placeholder="John">
</div>
</div>
<div class="control-group">
<label class="control-label" for="userid">Last Name:</label>
<div class="controls">
<input id="lastName" name="lastName" class="form-control" type="text" placeholder="Smith">
</div>
</div>
<!-- Password input-->
<div class="control-group">
<label class="control-label" for="password">Password:</label>
<div class="controls">
<input id="password" name="password" class="form-control" type="password" placeholder="********">
<em>Must have atleast one number</em>
</div>
</div>
<!-- Text input-->
<div class="control-group">
<label class="control-label" for="reenterpassword">Re-Enter
Password:</label>
<div class="controls">
<input id="reenterpassword" class="form-control" name="reenterpassword" type="password" placeholder="********">
</div>
</div>
<!-- Button -->
<div class="control-group">
<label class="control-label" for="confirmsignup"></label>
<div class="controls">
<div class="btn-toolbar">
<button id="confirmsignup" name="confirmsignup" class="btn btn-success">Sign Up
</button>
<button type="button" id="closeModal" class="btn btn-default" data-dismiss="modal">
Close
</button>
</div>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<div class="col-md-6 pull-right">
<a class="btn btn-block btn-social btn-facebook">
<span class="fa fa-facebook"></span> Sign in with Facebook
</a>
<a class="btn btn-block btn-social btn-foursquare">
<span class="fa fa-foursquare"></span> Sign in with Foursquare
</a>
<a class="btn btn-block btn-social btn-openid">
<span class="fa fa-openid"></span> Sign in with OpenID
</a>
<a class="btn btn-block btn-social btn-google">
<span class="fa fa-google"></span> Sign in with Google
</a>
<a class="btn btn-block btn-social btn-google">
<span class="fa fa-google"></span> Sign in with Google
</a>
</div>
</div>
</div>
</div>
</div>

Dropzone.js inside a Bootstrap modal break flow and styling

I am using the Dropzone.js plugin (which function to send via ajax and drag and drop effect, files to server) the problem is that it's breaking all the form of the stream (which contains other basic fields as input text / password) already tried incapsular tags within divs, add maximum size for file upload area but nothing worked.
I am using only the JS and CSS provided by jquery, bootstrap and
dropzone (and the shipping configuration).
I add the full sample project with this problem on Github
Scripts in tag Head
<link rel="stylesheet" href="library/Bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="library/dropzone/dropzone.css">
<link rel="stylesheet" href="assets/css/main.css">
<script defer src="library/jquery-1.11.1/jquery-1.11.1.min.js"></script>
<script defer src="library/Bootstrap/js/bootstrap.min.js"></script>
<script defer src="library/dropzone/dropzone.js"></script>
<script defer src="assets/js/main.js"></script>
Bootstrap modal:
<div class="modal fade" id="add-product-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title span7 text-center" id="myModalLabel">Add Product</h4>
</div>
<div class="modal-body">
<form class="form-horizontal dropzone" id="add-product-form" action="#" method="post">
<div class="dropzone-previews"></div> <!-- this is were the previews should be shown. -->
<div class="form-group">
<label for="input_email" class="control-label col-md-3">Your Email (login)</label>
<div class="col-md-9">
<input type="email" class="form-control" id="email" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="input_password" class="control-label col-md-3">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" id="pass" name="pass" placeholder="Password">
</div>
</div>
<div class="checkbox text-center">
<label><input type="checkbox" id="remember_me" name="remember_me">Remember me on this computer</label>
</div>
<div class="form-group text-center">
<div class="col-md-6 col-md-offset-3">
<button type="reset" class="btn btn-danger">Reset</button>
<button type="submit" class="btn btn-info">Login</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
The actual modal:
As it should be:
An easy solution is to use a div element inside the form to use as dropzone, here is how the modal-body would look like.
html:
<div class="modal-body">
<form class="form-horizontal" id="add-product-form" action="#" method="post">
<div id="myDropzone" class="dropzone"></div> <!-- This is the dropzone element -->
<div class="form-group">
<label for="input_email" class="control-label col-md-3">Your Email (login)</label>
<div class="col-md-9">
<input type="email" class="form-control" id="email" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="input_password" class="control-label col-md-3">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" id="pass" name="pass" placeholder="Password">
</div>
</div>
<div class="checkbox text-center">
<label>
<input type="checkbox" id="remember_me" name="remember_me">Remember me on this computer</label>
</div>
<div class="form-group text-center">
<div class="col-md-6 col-md-offset-3">
<button type="reset" class="btn btn-danger">Reset</button>
<button type="submit" class="btn btn-info">Login</button>
</div>
</div>
</form>
</div>
Then since you are using a div for your dropzone element you need to specify the url in the dropzone configuration:
js:
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("div#myDropzone", { url: "#"});

Button on form submits to search and not the form itself

I am running into an issue where submitting my form tries to POST to my search.php instead of requests.php like it should.
Search button on sidebar:
<li class="sidebar-search">
<form class="search" action="search.php" method="POST">
<div class="input-group custom-search-form">
<input type="text" class="form-control" name="results" placeholder="Search...">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="search">
<i class="fa fa-search"></i>
</button>
</span>
</div>
<!-- /input-group -->
</li>
Submit button for form:
<div class="panel-body">
<div class="row">
<form class="request" action="requests.php" method="POST">
<div class="col-lg-6">
<form role="form">
<div class="form-group">
<label>Address</label>
<input class="form-control" name="address" placeholder="Enter address">
</div>
<div class="form-group">
<label>Info</label>
<input class="form-control" name="info" placeholder="Enter info such as S/B, Locates, promised, fence/grass">
</div>
<button type="submit" name="request" class="btn btn-default">Submit Button</button>
<button type="reset" class="btn btn-default">Reset Button</button>
</div>
<!-- /.col-lg-6 (nested) -->
</div>
<!-- /.row (nested) -->
</div>
Looks like that you've forgotten to close the form tag
somewhere around this html comment "<!-- /input-group -->"
you should add
</form>
https://jsfiddle.net/2v049ksy/

Bootstrap modal form is so ugly

I need help i cant figure out why my modal login form is not conforming to any changes and doesn't look like the standard bootstrap form.
nav.php
<!-- Modal HTML -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Login</h4>
</div>
<div class="modal-body">
<p>Please log in below</p>
<form action="#" method="post" accept-charset="UTF-8">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
<label class="label" for="user" style="color: black">Username</label></br>
<input id="user" type="text" name="user" size="30" class="input-large" placeholder="username" required/>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
<label class="label" for="pass"style="color: black">Password</label></br>
<input id="pass" type="text" name="pass" size="30" class="input-large" placeholder="Password"required/>
</div>
</div>
<label class="string optional" for="user_remember_me"> Remember me</label> <input id="user_remember_me" style="float: left; margin-right: 10px;" type="checkbox" name="user[remember_me]" value="1" />
<input class="btn btn-success" style="clear: left; width: 100%; height: 32px; font-size: 13px; margin-bottom: 6px;" type="submit" name="submit" value="submit" />
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
here is what it looks like
here is an example of what i want it to look like
The documentation is your friend. Forms, inputs, and their labels need form-group and form-control (among other classes) attached to them.
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
</div>
</form>