Hello,
You simply should insert a “HTML Content” field with the piece of code as its content:
<script src="//static.leadpages.net/leadboxes/current/embed.js" async defer></script> <a href="" data-leadbox-popup="1404ad9f3f72a2:10a87dbe9746dc">Click here to subscribe</a>
Best regards.
Hello and thank you for your reply.
The difficulty is that I don’t want to put this in a HTML content field but a button. Inside the OnClick event of a button that is set to calculate a result for the field below it.
I have got this to work with a thank you page using the window.open command:
window.open('https://asiakaspalvelu.leadpages.co/vv-kiitos-yhteydenotostasi-dev/?type=individual');
I’ve tried pasting in the script for the leadbox but had no luck with it. It doesn’t do anything.
Regards,
Ross Uren
-
This reply was modified 6 years, 1 month ago by
rossuren.
Hello,
I’m not the developer of the “leadbox”, and in the demo you sent me, is being used an anchor tag with the attribute: data-leadbox-popup="1404ad9f3f72a2:10a87dbe9746dc"
To include the <script>
tag you can insert the tag directly in the webpage, or include the tag into the content of a “HTML Content” field if you want to insert it directly in the form.
If the only one requirement of leadbox is to insert the attribute in the button, and the button is for example the fieldname1, you simply should insert as part of the content of the “HTML Content” field, the piece of code:
<script src="//static.leadpages.net/leadboxes/current/embed.js" async defer></script>
<script>
fbuilderjQuery(document).one('showHideDepEvent', function(){
fbuilderjQuery('[id*="fieldname1_"]').attr('data-leadbox-popup','1404ad9f3f72a2:10a87dbe9746dc');
});
</script>
But as I said previously, it is only a supposition, the developer of leadbox has the last word.
Best regards.
Hello again,
I am of course aware that you didn’t create the Leadbox. Perhaps it wasn’t right to create this post but I thought with your expertise, perhaps you’d know a solution. The script didn’t work but in the meantime I found a workaround.
Thanks for your time and assistance in this matter.
Regards,
Ross Uren