When I test my contact form, the subject in the sent email does not give me the “New message from….”, but instead it actually puts the subject which was entered by the user submitting the form. In this case, I put “test” into all of the fields, and I received an e-mail with the subject “test”.
How do I fix this?
Hey Mike!
can you please post a link to your website? Did you update to the newest theme version? Please deactivate all plugins to see if one is causing this issue.
Cheers!
Andy
Hey!
If a “Subject” field is present it will be used as the mail subject instead of the form parameter. However, there is a way to overwrite this, try adding this at the very end of your theme / child theme functions.php file:
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3);
function avia_change_mail_subject($subject, $new_post, $form_params)
{
$subject = 'My email subject';
return $subject;
}
Cheers!
Josue
Thanks very much! :)