10 years ago
Topic
Greeting,

I have found an interesting plugin for validation in the website, here the link : http://www.seblod.com/products/595

Beside of that, i don't know how to configure it, in the description, it's said that the Function must be declared in your custom jquery (available on the form's page) and must return the error message.

Where is the custom Jquery please ? And how should i wrote the function ? Can you give exemple please ?

Thank's in advance for your interest.

Best Regard.
Get a VIP membership
693 Posts
rpoy
10 years ago
1
Level 1
Hi Popolvuh,

I see the other post in French.  As stated earlier, only one is necessary.

To use the Function Plugin on a field example: member_validation_id.

Step 1: define the function in the Script (JS) section which is found below the Storage section and by clicking on the orange chevron in the lower right hand corner.  So you need to define your logic and message but here is the basic idea:


myvalidation = function(){
var text = $(this).attr("member_validation_id").value;
var msg;
if(text!=2){
msg="NO";
}

return msg;
}

Step 2: Set the Validation (#3) option in the Content Type Manager to Function and give the name of the function that you defined the Step 1.
Validation: Function
Function Name: myvalidation



Hope that helps,

Randy


10 years ago
0
Level 2
Yes, of curse everything is clear.

Thx for your time and helmp.

Best Regard
raz
9 years ago
0
Level 1

Hi

If we use this product,

We can show validation message to user, but it can not prevent form from submitting,

how to prevent form from submit when the user enter wrong data?

Get a VIP membership