This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Submissions to Email with + sign
Started 14 years ago by akash8m | 5 posts |
-
Some users have Gmail with the following:
Example+123@gmail.com even though it is sent to Example@gmail.com.
Is it possible to have this input in the MachForm? Also, I would like to use this method when receiving the form submissions. Thanks.
Posted 14 years ago # -
You can change the validation for this. Edit "email_settings.php" file and go to around line 101 for this code :
$regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+\.[A-z0-9]{2,6}$/';
and change it to
$regex = '/^[\+]*[A-z0-9][\+\/\w.-]*@[A-z0-9][\w\-\.]*\.[A-z0-9]{2,6}$/';
for users input, you can edit "includes/common-validator.php" and go to line 210 for this code :
$regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]*\.[A-z0-9]{2,6}$/';
and change it to
$regex = '/^[\+]*[A-z0-9][\+\/\w.-]*@[A-z0-9][\w\-\.]*\.[A-z0-9]{2,6}$/';
that would do it
MachForm Support
Posted 14 years ago # -
Thanks Redityo for this solution. Cheers.
Posted 14 years ago # -
Hello Redityo, I changed according to your instructions, the user input works fine without any problems, but the Email_settings.php solution is not working still gives the same error.
"This field is not in the correct email format."
The new codes seem to be the same for both is that the problem?
Posted 14 years ago # -
Redityo, I fixed it, there were two occurrences of $regex in email_settings.php. When I changed both with the new codes it works fine. Thanks again for the help. Great service.
Posted 14 years ago #
Reply
You must log in to post.