"Form With Advanced File Upload"
Bootstrap 4.1.1 Snippet by KhuramMemon

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.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/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 ---------->
<!--
Copy this code in your html file.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>PHP Form</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous"/>
</head>
<body>
<div class="container">
<div class="Back">
<i class="fa fa-arrow-left" onclick="Back()"></i>
</div>
<p class="h2 text-center">Form</p>
<form action="" method="post">
<div class="preview text-center">
<img class="preview-img" src="http://simpleicon.com/wp-content/uploads/account.png" alt="Preview Image" width="200" height="200"/>
<div class="browse-button">
<i class="fa fa-pencil-alt"></i>
<input class="browse-input" type="file" required name="UploadedFile" id="UploadedFile"/>
</div>
<span class="Error"></span>
</div>
<div class="form-group">
<label>Full Name:</label>
<input class="form-control" type="text" name="fullname" required placeholder="Enter Your Full Name"/>
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
/* Copy this code in your css file. */
html,body
{
width: 500px;
margin: auto;
}
.container
{
width: 500px;
margin: 20px auto;
}
.preview
{
padding: 10px;
position: relative;
}
.preview i
{
color: white;
font-size: 35px;
transform: translate(50px,130px);
}
.preview-img
{
border-radius: 100%;
box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.7);
}
.browse-button
{
width: 200px;
height: 200px;
border-radius: 100%;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
// Copy this code in your js file.
function Back()
{
window.history.back();
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: