Field validation - Forum | JoomShaper
Staff replied SP Page Builder

Field validation

Asked by Robert 5 years ago Last activity 5 years ago

Hi there,

Is it possible to validate the fields of a contact form with form builder? I get a lot of people who enter their phone number at the email field... It would be great if it wasnt possible to enter numbers in a text field and the other way around (text in number field).

I have found a piece of Java code that could help me with this but i have no idea where to put it and if it would work... Maybe someone could point me in the right direction on this...

3 replies

Ofi Khan Staff

Hello Robert

The fields are already validated. You should not exclude numbers because people use numbers on their email address. This is not logical.

Best regards

Robert Asked this

Hi Ofi,

I allready had a feeling they were validated (since we have the option to choose field types) but you're right about that. Excluding numbers was a bad way to solve this. Then again it would be fantastic if i could set a condition for the email field so people have to enter something with an "@". Now people can just put in their number in the email field... I could alter the Java-code i have by changing the conditions to this but I have absolutely no clue where to put it...
If the fields are allready validated could you tell me where this code is at?

Ofi Khan Staff

okay, you can customize it. Here is the file location: components\com_sppagebuilder\addons\ajax_contact\site.php

Log in to reply.