WordPress.org

Support

Support » Plugins and Hacks » Grab success/failure from the front end

Grab success/failure from the front end

  • Jake Love

    @rockymountainhigh1943

    Is there a way that I can handle a successful send within my template? Is there some AJAX var that I can grab or is there any recommended methods?

    The goal would be to submit the form and a custom message comes up (really custom). The custom message would be set within that page template by a non-technical user (so it can’t be a part of the actual contact form build process). I just need a solution I can tie to from the front-end that will help me process the event.

    Below is a ruff example of what I have so far. I would much rather do this in a more reliable fashion:

    <script>
    $(function(){
     $('#sidebarInner form').submit(function(){
        setTimeout(function(){
          var formState = $('#sidebarInner form').attr('class');
          console.log(formState);
        }, 1000);
     });
    });
    </script>

    I want the form to go away and the message to appear. I don’t need help with any of the front end functionality – only a reliable method to grabbing the success/failure via JavaScript.

    Thanks,
    Jake

    http://wordpress.org/extend/plugins/contact-form-7/

  • The topic ‘Grab success/failure from the front end’ is closed to new replies.