I've installed via NPM into my Laravel 8 project.
I've added all this at the bottom of my page
<script>
bsCustomFileInput.init();
var btn = document.getElementById('btnResetForm');
var form = document.querySelector('form');
btn.addEventListener('click', function () {
form.reset()
})
</script>
I've added this to my form
`
</div>`
When I click Browse, I am able to choose a file, but nothing else. No filename shows.
I see "use with npm - import bsCustomFileInput from 'bs-custom-file-input'" but I'm not sure what this means if I've already installed it via npm.
I have a 404 for the js file and an uncaught ref error bsCustomFileInput is not defined.
Addendum. I tried it with all the exact code on the sample page here and got the same errors. I'm sure the problem is me, but I'm at the end of things I know to try.
Npm puts that file into node_modules but that can't be referenced once rendered so I'm not sure how to reference it in the src script, and it doesn't exist in any public resources.
I've installed via NPM into my Laravel 8 project. I've added all this at the bottom of my page
I've added this to my form `
When I click Browse, I am able to choose a file, but nothing else. No filename shows. I see "use with npm - import bsCustomFileInput from 'bs-custom-file-input'" but I'm not sure what this means if I've already installed it via npm.
I have a 404 for the js file and an uncaught ref error bsCustomFileInput is not defined.
What am I missing? Thanks
Addendum. I tried it with all the exact code on the sample page here and got the same errors. I'm sure the problem is me, but I'm at the end of things I know to try. Npm puts that file into node_modules but that can't be referenced once rendered so I'm not sure how to reference it in the src script, and it doesn't exist in any public resources.