Edit AI Contact Form

General Settings

Email Settings

To Email
Sender's message was sent successfully
Sender's message failed to send

Theme Settings

Themes
site_url('wp-admin/admin-ajax.php'), 'plugin_url' => plugin_dir_url(__FILE__), 'success_message' => get_option('qdcu_success_message'), 'error_message' => get_option('qdcu_error_message') ); wp_localize_script( 'contactus', 'php_vars', $dataToBePassed );?>

errors)) { $html = ""; $name = qdcu_sanitize_field($_POST['name']); $email = sanitize_email($_POST['email']); $email_subject = qdcu_sanitize_field($_POST['subject']); $email_message = qdcu_sanitize_field($_POST['message']); $to_email = get_option('qdcu_to_email'); $headers[] = 'Content-Type: text/html; charset=UTF-8'; $headers[] = "Reply-To: $email \r\n"; $html .= "
"; $html .= ""; $html .= ""; $html .= ""; $html .= ""; $html .= "
" . get_bloginfo('name') . "
Dear Admin,

" . $name . " has been wanted to contact you, along with following information:

Name: " . $name . "
Email: " . $email . "
Message: " . $email_message . "
"; $html .= "
"; echo wp_mail($to_email, $email_subject, $html, $headers); } else { echo $errors; } exit(); } } function qdcu_validate_form() { $errors = new WP_Error(); if ( isset( $_POST[ 'name' ] ) && $_POST[ 'name' ] == '' ) { $errors->add('name_error', 'Please fill in a valid name.' ); } if ( isset( $_POST[ 'email' ] ) && $_POST[ 'email' ] == '' ) { $errors->add('email_error', 'Please fill in a valid email.' ); } if ( isset( $_POST[ 'subject' ] ) && $_POST[ 'subject' ] == '' ) { $errors->add('subject_error', 'Please fill in a valid subject.' ); } if ( isset( $_POST[ 'message' ] ) && $_POST[ 'message' ] == '' ) { $errors->add('message_error', 'Please fill in a valid message.' ); } return $errors; } function qdcu_sanitize_field( $input ){ return trim( stripslashes( sanitize_text_field ( $input ) ) ); }