I am using the standard Contact page, including a field for email address. Some users do not type a valid email (most mistakes are writing a surname in that field), so I can’t reply to their question.
The mailer.php script does validate the email (looking for a @ and a dot), but does not warn the user that the email address they have typed is invalid. Instead it just substitutes the form’s owners email address.
I think if we choose to use an email field, the form should validate the submitted email, and then warn the user if the email address is not valid. I have added the following code to my version of mailer.php:
//check user-type valid email
if (! check_email($submitted_email)) {
redirect($return_url, 'The email address you have typed is not valid. Please try again.');
}
Could this be included in future releases, at least as an option??
mailer.php will be in the folder on your +hosted, published site+ at:
contact-form > files > mailer.php
You can access that with an ftp program or the control panel on your hosting service. This method does work, however you will have to re-upload the modified mailer.php file every time you update your RW project, as RW will overwrite the modified mailer.php with it’s own default mailer.php each time you re-publish.
A solution is to use a contact form stack with the YourHead Stacks plug-in. It’s hard for me to imagine using RW without the Stacks plug-in.