• Resolved rossuren

    (@rossuren)


    I’m unsure if this is possible but thought from reading through the support forum posts that there are no stupid questions! I hope.

    I am trying to figure out how to launch this Leadbox:
    <script src="//static.leadpages.net/leadboxes/current/embed.js" async defer></script> <a href="" data-leadbox-popup="1404ad9f3f72a2:10a87dbe9746dc">Click here to subscribe</a>

    This example is to be triggered with a text link but the script and object location are there I believe.

    I am currently using this code to open a new window with a thank you page:
    window.open('https://asiakaspalvelu.leadpages.co/vv-kiitos-yhteydenotostasi-dev/?type=individual');

    Hope to hear from @codepeople soon ??

    Regards,

    Ross Uren

    • This topic was modified 7 years, 10 months ago by rossuren.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    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.

    Thread Starter rossuren

    (@rossuren)

    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 7 years, 10 months ago by rossuren.
    Plugin Author codepeople

    (@codepeople)

    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.

    Thread Starter rossuren

    (@rossuren)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is it possible to open a Leadbox with the OnClick event on a button?’ is closed to new replies.