Jquery script not working in Hubspot but working fine in other site and console.
SOLVE
@karensantana - I'm willing to bet that, since forms are loaded dynamically with JS, your script is triggering way too early, before the form elements have rendered. That's why you can run the script in console and it works. Most likely you are running the script when you can visibly see the form or the elements of the form you are trying to remove. Try putting your script in an interval just to test if it gets executed after a few seconds
setInterval(function(){
// run your code here
}, 1000);
If this answer helped, please, mark as solved 😄
tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.
Jquery script not working in Hubspot but working fine in other site and console.
SOLVE
@karensantana - I'm willing to bet that, since forms are loaded dynamically with JS, your script is triggering way too early, before the form elements have rendered. That's why you can run the script in console and it works. Most likely you are running the script when you can visibly see the form or the elements of the form you are trying to remove. Try putting your script in an interval just to test if it gets executed after a few seconds
setInterval(function(){
// run your code here
}, 1000);
If this answer helped, please, mark as solved 😄
tim@belch.io | forms.belch.io | Design your own Beautiful HubSpot Forms; No coding necessary.