Contact Form 7
[resolved] What is the JS hook for not sent ok? (3 posts)

  1. saminternetmarketing
    Posted 2 years ago #


    If an e-mail is sent ok the JS hook is on_sent_ok: what is the one if the message is not sent correctly?

    Also, I would like to know if there is a simple method to display only the error/ success message instead of the entire form once the submission is made?

    Thanks in advance,


  2. Takayuki Miyoshi
    Plugin Author

    Posted 2 years ago #

    When it's failed, the <form> element will have 'failed' class attribute. If you don't want to show the form, hide children of .failed.

  3. saminternetmarketing
    Posted 2 years ago #

    Hi Takayuki,

    Thanks a lot for the reply. I somehow missed to check that earlier. I also found the attribute for success is .sent(for the benefit of others).

    Cheers and Kudos for the great work you do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic