tinternet.net/assets/js/addons/form.js

12 lines
290 B
JavaScript
Raw Normal View History

2021-03-16 10:37:12 +01:00
const $ = require('jquery');
module.exports = function() {
$('.custom-file-input').on('change', function(event) {
let inputFile = event.currentTarget;
$(inputFile).parent()
.find('.custom-file-label')
.html(inputFile.files[0].name);
});
};