Can I create a hubspot form with a javascript function once needed.
I have a page that only shows my form after completing a quiz (and there are 3 different forms depending on your answers). I want to run the hbspt.forms.create({...}) snippet from within the function which sets innerHTML of my target div to be the form.
Can I create a hubspot form with a javascript function once needed.
Hi @mswinimer , thank you for writing in the forum. This is definately possible, you just need to wrap your form in a function that has a arguement and based on that arguement you should run the respective form, it really depends on how your whole application is structured, maybe if you share a piece of code that controls the quiz I could guide you through the rest of the implementation, but this is definately possible, here is an extremly simple example that renders differrent form based on the clicked button: