# Friendlier Contact Form 7 Response Messages

> Replaces the standard Contact Form 7 success, error and spam messages on every form with your own wording in one place.

- Type: PHP
- Runs: Run everywhere
- Category: [Forms](https://wpide.com/library/category/forms/)
- Tags: contact-form-7, messages, copy
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/cf7-custom-response-messages/

## Code

```php
// CF7 message name => your text.
$wpide_cf7_messages = array(
    'mail_sent_ok'     => 'Thanks! Your message is on its way and we usually reply within one working day.',
    'mail_sent_ng'     => 'Sorry, something went wrong sending your message. Please try again or email us directly.',
    'validation_error' => 'Please check the highlighted fields and try again.',
    'spam'             => 'Your message could not be sent. If you are a real person, please email us directly.',
    'invalid_required' => 'This field is required.',
);

add_filter( 'wpcf7_display_message', function ( $message, $status = '' ) use ( $wpide_cf7_messages ) {
    return isset( $wpide_cf7_messages[ $status ] ) ? $wpide_cf7_messages[ $status ] : $message;
}, 10, 2 );
```

## Notes

Keys are CF7 message names (mail_sent_ok, mail_sent_ng, validation_error, spam, accept_terms, invalid_required); remove a line to keep the form's own text.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Friendlier Contact Form 7 Response Messages" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
