Tagged: CONTACT FORM
Hi Team, is there a way our contact form sends the mail to our address using the user mail as sender and not the no-reply mail of wordpress?
Hey John,
Thank you for the inquiry.
You can use the avf_form_from filter to change the “from” address to the sender’s email address, but this might lead to the messages being filtered as spams and not reaching the receiving address.
function avf_change_cf_from($send_from, $new_post, $form_params) {
return $new_post['1_1'];
}
add_filter('avf_form_from', 'avf_change_cf_from', 10, 3);
The key 1_1 refers to the first field in the contact form. If the email field is the third field in the contact form, you should replace the key with 3_1.
Best regards,
Ismael
Hi Ismael, thank you very much, where do i make this change?