CalcBuilder Forum

Email validation

User _MSTeam# 2012-07-20 09:34:02

Here is the solution to add an email validation to one of your form fields, which you have typed 'text'.

Go to javascript events, and write this:

getCBFormValue('x').addClass('validate-email');


Where 'x' is the field ID (from fields and code tab).

Moonsoft support 2012-07-23 06:19:01

I tried this and didn't have success. In my case the name of the field variable is email.

Here's what I put in the Javascript events:

getCBFormValue('email').addClass('validate-email');

Did I miss something?

User _MSTeam# 2012-07-23 09:54:58

Hello,

getCBFormValue('email').addClass('validate-email'); is not valid...

Just change 'email' text by the id of this field. You can check the id of the field in 'fields and code' section, on the left side of the field.

For example, if 'email' field has 5 as id, you should write:

getCBFormValue('5').addClass('validate-email');

Regards,

Moonsoft support 2012-07-23 18:55:07

That worked. Thanks!

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
List Manager

Build different lists for your site

Buy now!