Craig Ralston

Web Developer

Contact Form 7 – “Send me a copy” Checkbox

UPDATE: The following code no longer works as of CF7 v3.9 as the author has changed how wpcf7_before_send_mail() works. Here is an updated guide for v3.9+ written by Max Pohlenz

Contact Form 7 is a highly customizable and widely used WordPress plugin (at the time of writing there have been 24,137,767 downloads); We currently have 67 of our 98 WordPress sites with this plugin installed.

I recently had a client request a checkbox field for “Send me a copy of this message” which, when checked, should send the user their own copy of the form submission. This is not an entirely uncommon request and luckily, CF7 is pretty well-developed and allows developers to extend the plugin via filters.

The following shows the end result; a checkbox in which the user can choose to send a copy of the form to themselves as well as the set recipient:

Add that as either a plugin or in your child theme functions.php file.

Next, load up your form in the admin area.

Create your checkbox using [checkbox copymyself "Send me a copy of this message"] – It is important you use the same name as you checked for in the function above (in this case, “copymyself”) or this will not work.

IMPORTANT: Mail(2) needs to be turned on in CF7 settings area.