Created
March 13, 2024 11:58
-
-
Save devstar0209/ffd5012068f6a266879cd7c4e635190e to your computer and use it in GitHub Desktop.
Customize file input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-control d-flex justify-content-between align-items-center"> | |
<input hidden type="file" accept=".pdf,.png,.jpeg,.jpg" name="bankFile" id="bankFile" class="form-control" required> | |
<p>{{__('BANK ac proof')}}</p> | |
<label for="bankFile" class="btn btn-light btn-sm">Upload</label> | |
</div> | |
<script> | |
$('input[type="file"]').on('change', function() { | |
$(this).next().html($(this).val().split("\\").splice(-1,1)[0] || "Select file"); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment