Author Topic

Veronique Jamilloux

Tuesday 01 June 2010 7:02:15 am

Comment59402

Hi,

I've the same questions the Alex about the validation fields of my form.

I read the exellent "How to Create Exponential Forms" documentation from Paul Wilson. I read also "Enhanced content edit handler for validation rules in Exponential 4.1" from Lukasz but I don't really understand very well all the indications.

In my form there are 2 fields email and email_confirm and I would like verify if they are equal. In which file I can put the validation rule in template/content/collectedinfo_validation.tpl?

In my old website I used a java script fonction in the form page :

function validate_equals(field1, field2, alerttxt) {
 with (field1) {
   if (value!=field2.value) {
    alert(alerttxt);
    return false;
   }
   else {
    return true;
   }
 }
}

Is there anybody to tell me how can make this validation rule?

I use eZpub 4.2.0

Thank a lot for your answers.

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles