The Contact Form Module allows website visitors to easily get in touch with you.
Sometimes, it's beneficial for both you and the sender to receive a copy of the submitted form.
This guide will walk you through the steps to configure your contact form to automatically send a copy of the submission to the sender.
If you don't use a Child theme, install and activate one
Using an FTP connection, hosting File Manager app, or the Advanced File Manager plugin, navigate to your child theme folder and create a new folder name module
In the module folder, create a new PHP file called ContactForm.php
Copy/paste the code from this page
Edit the functions.php file inside your child theme, and after the existing code, add this PHP code:
/*================================================
#Load custom Contact Form Module
================================================*/
function divi_custom_contact_form() {
get_template_part( '/module/ContactForm' );
$dcfm = new Custom_ET_Builder_Module_Contact_Form();
remove_shortcode( 'et_pb_contact_form' );
add_shortcode( 'et_pb_contact_form', array( $dcfm, '_render' ) );
}
add_action( 'et_builder_ready', 'divi_custom_contact_form' );
function divi_custom_contact_form_class( $classlist ) {
// Contact Form Module 'classname' overwrite.
$classlist['et_pb_contact_form'] = array( 'classname' => 'custom_ET_Builder_Module_Contact_Form',);
return $classlist;
}
add_filter( 'et_module_classes', 'divi_custom_contact_form_class' );