• I use the Divi theme with a CF7 module. I have a need when a page is loaded that it automatically triggers the submit button to send me a email. Hunting on the internet I found this code

    <script type="text/javascript">
    jQuery(document).ready(function(){
         jQuery("#wpcf7-f3857-o1 form").submit();
    });
    </script>

    where wpcf7-f3857-o1 is the CSS id of the CF7

    When the page is activated a loop occurs where its attempting to press the submit button with a message saying its unsuccessful, others using this code have had the same problem. I am unable to find an actual solution to automatically trigger the submit button on page load.

    Has anyone got any ideas? Thankyou for any assistance.

The topic ‘Auto submit on page load’ is closed to new replies.