ExpressionEngine v2.4.0 - Build: date 20120123
Freeform 3.1.3
Matrix 2.2.4Enabled
P&T Field Pack 1.0.3
SafeCracker 2.1
Wiki 2.3
Hi,
I’ve made 2 freeforms I need to check/validate some fields that are required.
It’s about events I need a begindate and an enddate. Begindate has to be the same as today or later and the enddate has to be the same as begindate or later.
Begin and enddate are dropdown/select field. I also want the error code on the same page to be shown behind the field.
I do like to get a hint how to do that.
answer form solspace:
Unfortunately this kind of validation is not possible in Freeform. The only validation in Freeform is checking if the field is required and filled out.
I suggest using a javascript solution for validating your form and having inline error messages. I have a preference for Bassistance’s jquery validation script (http://bassistance.de/jquery-plugins/jquery-plugin-validation/), but there might be other jQuery/javascript plugins that come in handy
I tried jquery but I can’t seem to get it working.
I put this in my header:
[removed][removed]
[removed][removed]
[removed][removed]
[removed]
$(document).ready(function() {
$("#commentForm").validate({meta: "validate"});
$("#commentForm2").validate();
$("#commentForm3").validate({
messages: {
email: {
required: 'required field!'
}
}
});
});
[removed]I put this in my form:
<input type="text" name="email" size="50" class="{required:true, email:true, messages:{required:'e-mail required', email:'vali email is required}}" /></td>Can someone help me please
greetings,
Franka
Ps By mistake I first put this topic in General Discussion and I don’t know how to change that so I just copied my topic here. This whole list of fora is not transparant for a newbie.