ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

How to avoid submissions from certain domain extensions?

baxterdown 27 Nov, 2020
Hi everyone,

I have a couple of CFv5 installations where the forms are being abused with submissions from emails with .ru email addresses (i.e.name@xyz.ru). How do I setup email validation where if the email address has .ru extension the form will not submit?

I am not a programmer so if the setup requires code, I would appreciate step-by-step instructions.

Thank you in advance for you assistance!

Jose
Max_admin 29 Nov, 2020
Answer
Hi Jose,

In v5 I think that you will need some PHP code to test the email address in the data:
if(strpos($this->data["email_field_name"], ".ru") !== false){
//redirect
}
in v7 there is a validation rule for "does not contain", which you can use to block certain string
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
baxterdown 29 Nov, 2020
Hi Max.

Thanks for the info. I looked on several places and couldn't figure out where to put it. If I recall correctly (I might be incorrect), it should not go in the Form Code tab because that gets rewritten every time the form is edited.

Where do I add the PHP code?

Thanks for your help,

Jose
Max_admin 04 Dec, 2020
Hi Jose,

In a PHP action!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
You need to login to be able to post a reply.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com