Accessing elements outside of a Hubspot embed form from the onFormSubmit
Context: I have a Hubspot embed form on a clickfunnels page. Originally, I had the form redirect to another funnel page on submit, but this was not tracking conversions in clickfunnels stats.
I tried making a hidden clickfunnels button on the page to submit after the HS form was submitted. However, I'm not able to reference any outside elements from the HubSpot form it seems.
Does anyone know of a solution or work-around to acomplish this goal?
Accessing elements outside of a Hubspot embed form from the onFormSubmit
What kind of element is the click funnels button? Is it an HTML button or <a>?
Do you have inline text after submission or does it redirect to another page? If inline text, what happens if you redirect to another landing page and then click your click funnels button?
Another thing I would try is see if you can do anything else to the button like change the CSS style to see if the click event is the issue or the selecting of the element
Just curious, why are you using click funnels instead of hubspot?
Accessing elements outside of a Hubspot embed form from the onFormSubmit
Hello, I have the same issue. I need help (I'm not a developer !).
I'm trying to add a HubSpot form in a ClickFunnels page. No problem to add the custom javascript in the ClickFunnels page.
My problem is that I don't want two submit buttons. What should I add in the javascript so that when the submit button on the HubSpot form is clicked, it activates the submit button on the ClickFunnels page?
Accessing elements outside of a Hubspot embed form from the onFormSubmit
That's a good point. I have a submit button on the embed form which when submitted, is supposed to trigger a hidden clickfunnels submit button. (So the conversion will get tracked in CF)
I'll try the same function but targeting an html button to see if that one gets clicked.
Accessing elements outside of a Hubspot embed form from the onFormSubmit
Hmm... onFormSubmitted might be too late but onFormSubmit executes after the form is validated, just before the data is actually sent. So try changing that first @Andykins, should work. If not, let us know and if you could give us the address of the page you're seeing the issue we can help further.
Accessing elements outside of a Hubspot embed form from the onFormSubmit
I tried your recommendation. I also added a console log in the form submit function to show a value for the element, which it does. However it's not actually clicking the button.. It feels like the actual trigger('click') just isn't happening. I've tried variations of the trigger method but none seem to be working.