WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] HTML in successful submission message (5 posts)

  1. dhobeika
    Member
    Posted 1 year ago #

    2 questions:

    1. After someone successfully submits a form, I had some html code in the message that appears at the bottom of the form after the form is successfully submitted. It used to work fine, but I think with a recent update, something happened and now you just see the html code and not the nicely formatted success message with paragraphs and an email address and what not. Are there any fixes for this?

    2. Also, on the mail (2) settings, I set the "from" email address as the name I want to be on the reply and then the email in this format: <email@emailaddress.com> but instead, the recipients are receiving the email from a default hostmonster address. Any way to fix this?

    Thanks!

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

  2. iuttu
    Member
    Posted 1 year ago #

    We had the same problem with HTML responses. We solved it with this code:

    if(!function_exists('iuttu_wpcf7_form_response_output_filter')){
    	function iuttu_wpcf7_form_response_output_filter($output, $class, $content, $this){
    		return '<div class="' . $class . ' ">' . $content . '</div>';
    	}
    	add_filter( 'wpcf7_form_response_output', 'iuttu_wpcf7_form_response_output_filter', 10, 4);
    }
  3. dhobeika
    Member
    Posted 1 year ago #

    Thanks! What file did you put that code into?

  4. iuttu
    Member
    Posted 1 year ago #

    Edit functions.php in your theme and just add it.

  5. Swylen2012
    Member
    Posted 1 year ago #

    Thanks man your a lifesaver!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic