Not working in HubSpot, filestyle is not a function error
Closed this issue · 3 comments
I have tried to use this script but it just will not work. Hubspot is built on bootstrap 2.0.4 and I was so happy to find this but I have tried putting on page, adding to template since I have forms on mutitple pages, tried :file, .hs-input[type=file], tried the input id. nothing seems to work.Added this to footer
<script>
$('.hs-input[type=file]').filestyle({
badge: true,
input : false,
btnClass : 'btn-primary'
});
</script>
nothing.In the inspector I see Uncaught TypeError: $(...).filestyle is not a function. Any advice? https://www.acpcomposites.com/contact
Your online example is not working. Please send an example so I can analyze
I know it is not working. I keep getting Uncaught TypeError: $(...).filestyle is not a function. Here is a page where it button is actually visible.
https://www.acpcomposites.com/company
Your form is loaded via ajax, probably your problem is with the filestyle statement that is made in the body. When you do this you use the plugin before the form exists. You commented the declarations of your code, then it is more difficult to test.