• Resolved mjunes

    (@mjunes)


    Hello,

    how to insert an ad inside the form. I’m using this plugin called AdInserter and it has an option called “Insert before HTML element”. I tried using that option to insert an ad before a div element present inside the calculated form but the ad is not getting inserted.

    However, when I try to insert the ad before the form (#fbuilder) the ad shows perfectly. Can you help? Thanks in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @mjunes

    The form is rendered on the client-side, which means the webform has not been created when “Ad Inserted” tries to insert its piece of code.

    You have two alternatives:

    * Activate the form’s cache from the settings page of the plugin. The form’s structure is created previously.

    * The second alternative would be to generate the ad into the page, and move it into the form once it is rendered:

    – Insert a Div tag directly into the page’s content, and configure the Ads plugin to generate the ad into this tag:

    <div class="ad-here" style="display:none;"></div>

    – Now, insert an “HTML Content” field where you want to display the ad, with the following piece of code as its content:

    <div class="move-ad-here"></div>
    <script>
    fbuilderjQuery(document).one('showHideDepEvent')
    {
    if(typeof ad_moved != 'undefined') return;
    fbuilderjQuery('.move-ad-here').html(fbuilderjQuery('.ad-here').html());
    fbuilderjQuery('.ad-here').html('');
    }
    </script>
    

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Inserting Ad inside form’ is closed to new replies.