Support » Plugin: Add-on Contact Form 7 - MailPoet 3 » jQuery code before footer

  • Hello,

    I use this plugin in combination with Contact Form 7.
    After I enabled the plugin, the following code will be added before the footer.

    Now I get the error “Uncaught ReferenceError: jQuery is not defined”, because the script below will be loaded before the jquery embed script.

    Do you have a solution for this problem?

    Thank you!

    <script>
        jQuery(document).ready(function($) {
            var $checkboxes;
            function storekey() {
                var keysVal = $checkboxes.map(function() {
                    if(this.checked) return $(this).attr('data-key');
                }).get().join(',');
                $("input[name='fieldVal']").val(keysVal);
            }
            $(function() {
                $checkboxes = $("input[class='listCheckbox']").change(storekey);
            });
        });
    </script>
Viewing 1 replies (of 1 total)
  • Kamrul@Tikweb

    (@abdultikweb)

    Hello,

    Please make sure jquery is loaded before this script. This kind of issue might happen because of your theme or plugin that conflicts with other. Try changing to new theme (exm: twenty nineteen). If the problem still persist, disable all the plugins except those two plugins (MailPoet 3 and Add-on Contact Form 7 – MailPoet 3) and see if the problem still persist.

    Thanks

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.