Replace input file with my own button in the form
You'll achieve this with couple of lines of CSS. Fiddle
input[type="file"] {
display: none;
}
.custom-file-upload {
border: 1px solid #ccc;
display: inline-block;
padding: 6px 12px;
cursor: pointer;
}
<label for="file-upload" class="custom-file-upload">
<i class="fa fa-cloud-upload"></i> Custom Upload
</label>
<input id="file-upload" type="file"/>
Your Html with simplte font awesome customization FIddle
.image-upload > input
{
display: none;
}
.attach-doc
{
cursor: pointer;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="image-upload">
<label for="file-input">
<i class="attach-doc fa fa-paperclip fa-2x" aria-hidden="true"></i>
</label>
<input id="file-input" type="file"/>
</div>