How to use the Button trigger code snippet as a 'external url'
Hi,
I have created a popup form with the new popup cta builder in hubspot. Now it says to use a button module from hubspot and pick the cta. This all works. But the button module from hubspot does not have the styling options i want.
So i want to use another button module, but this module only has the option to link to content, file or url. Now it says this on the hubspot page:
"Use this code snippet as the href on a button on your external website to trigger your CTA." But my question is, how do I do this? 😅
this is the snippet: javascript:postMessage({ type: 'HS_DISPLAY_CALL_TO_ACTION', id: 92185297035 });
If you want to use a default button you'd have to use the "external URL" option and set it to an ID like "#modal-box", add a javascript/jQuery which will trigger the modal box opening when a button with this URL is clicked...
The CTA button trigger cta has now been changed to use a class instead of the java code snippet.
The class code snippet is: hs-cta-trigger-button hs-cta-trigger-button-92185297035
How would i go about to add this to a html text link for example? Would it be something like this: <a href="#" class="hs-cta-trigger-button hs-cta-trigger-button-92185297035">click me</a>
My knowledge of any code is very minimal haha. So this is a bit overwhelming for me.
Can I add the modal-box code in the html header or wont that work?
Im trying to get the same result when using the hubspot button but with an html text link or a button from a theme linking to an exernal url.
When I add the code snippet as a URL im getting this error message so i know im doing somehting wrong.
I think im totally overlooking something haha. sorry for my lack of knowlegde about code. We can not really adjust any code on the website only add code in the html header and footer section.