"BS4 Login, Register FORM + Mobile"
Bootstrap 4.0.0 Snippet by TheAlexandru

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="/style.css">
<title>Bootstrap 4 Login/Register Form</title>
</head>
<body>
<div id="logreg-forms">
<form class="form-signin">
<h1 class="h3 mb-3 font-weight-normal" style="text-align: center"> Sign in</h1>
<div class="social-login">
<button class="btn facebook-btn social-btn" type="button"><span><i class="fab fa-facebook-f"></i> Sign in with Facebook</span> </button>
<button class="btn google-btn social-btn" type="button"><span><i class="fab fa-google-plus-g"></i> Sign in with Google+</span> </button>
</div>
<p style="text-align:center"> OR </p>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required="" autofocus="">
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required="">
<button class="btn btn-success btn-block" type="submit"><i class="fas fa-sign-in-alt"></i> Sign in</button>
<a href="#" id="forgot_pswd">Forgot password?</a>
<hr>
<!-- <p>Don't have an account!</p> -->
<button class="btn btn-primary btn-block" type="button" id="btn-signup"><i class="fas fa-user-plus"></i> Sign up New Account</button>
</form>
<form action="/reset/password/" class="form-reset">
<input type="email" id="resetEmail" class="form-control" placeholder="Email address" required="" autofocus="">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* sign in FORM */
#logreg-forms{
width:412px;
margin:10vh auto;
background-color:#f3f3f3;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
#logreg-forms form {
width: 100%;
max-width: 410px;
padding: 15px;
margin: auto;
}
#logreg-forms .form-control {
position: relative;
box-sizing: border-box;
height: auto;
padding: 10px;
font-size: 16px;
}
#logreg-forms .form-control:focus { z-index: 2; }
#logreg-forms .form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
#logreg-forms .form-signin input[type="password"] {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
#logreg-forms .social-login{
width:390px;
margin:0 auto;
margin-bottom: 14px;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function toggleResetPswd(e){
e.preventDefault();
$('#logreg-forms .form-signin').toggle() // display:block or none
$('#logreg-forms .form-reset').toggle() // display:block or none
}
function toggleSignUp(e){
e.preventDefault();
$('#logreg-forms .form-signin').toggle(); // display:block or none
$('#logreg-forms .form-signup').toggle(); // display:block or none
}
$(()=>{
// Login Register Form
$('#logreg-forms #forgot_pswd').click(toggleResetPswd);
$('#logreg-forms #cancel_reset').click(toggleResetPswd);
$('#logreg-forms #btn-signup').click(toggleSignUp);
$('#logreg-forms #cancel_signup').click(toggleSignUp);
})
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

How can I force "social buttons" in one single row on "form-signup"?

ElGranFacio (-1) - 3 years ago - Reply -1


How can I force social buttons in one single row on form-signup?

ElGranFacio (-1) - 3 years ago - Reply 0


e

xhat007 (1) - 3 years ago - Reply 0


How can use you coding in my site kindly you can reach out

ESARTODAY () - 4 years ago - Reply 0


e

xhat007 (1) - 3 years ago - Reply 0