Hi!
I'm sorry but my english is very bad.
I have a problem when I try to validate at least one of 5 fields. I have 5 text box (Facebook, Twitter, GooglePlus, LinkedIn, Skype). I add load JS in Onload section with next code (one function per field):
In each field I added in custom function field, the name of de function
When I submit form first time, the validation is ok, but if I insert one field, for example Twitter, the form continue validating other fields
I also try with only one function with same result:
Can i help me?
I'm working in localhost, so I can't send you an access
Thanks in advance
I'm sorry but my english is very bad.
I have a problem when I try to validate at least one of 5 fields. I have 5 text box (Facebook, Twitter, GooglePlus, LinkedIn, Skype). I add load JS in Onload section with next code (one function per field):
function checkNoFacebook(elem){
if(elem.val() || jQuery("#Twitter").val() || jQuery("#GooglePlus").val() || jQuery("#LinkedIn").val() || jQuery("#Skype").val()){
return true;
}
return false;
}
function checkNoTwitter(elem){
if(elem.val() || jQuery("#Facebook").val() || jQuery("#GooglePlus").val() || jQuery("#LinkedIn").val() || jQuery("#Skype").val()){
return true;
}
return false;
}
function checkNoGoogle(elem){
if(elem.val() || jQuery("#Twitter").val() || jQuery("#Facebook").val() || jQuery("#LinkedIn").val() || jQuery("#Skype").val()){
return true;
}
return false;
}
function checkNoLinkedin(elem){
if(elem.val() || jQuery("#Twitter").val() || jQuery("#GooglePlus").val() || jQuery("#Facebook").val() || jQuery("#Skype").val()){
return true;
}
return false;
}
function checkNoSkype(elem){
if(elem.val() || jQuery("#Twitter").val() || jQuery("#GooglePlus").val() || jQuery("#LinkedIn").val() || jQuery("#Facebook").val()){
return true;
}
return false;
}
In each field I added in custom function field, the name of de function
When I submit form first time, the validation is ok, but if I insert one field, for example Twitter, the form continue validating other fields
I also try with only one function with same result:
function checkSocial(elem){
if(jQuery("#Facebook").val() || jQuery("#Twitter").val() || jQuery("#GooglePlus").val() || jQuery("#LinkedIn").val() || jQuery("#Skype").val()){
return true;
}
return false;
}
Can i help me?
I'm working in localhost, so I can't send you an access
Thanks in advance
Hello twifer,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I format a date in the datepicker?
Validation customization in CFv5
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I format a date in the datepicker?
Validation customization in CFv5
P.S: I'm just an automated service😉
When I submit form first time, the validation is ok
What does this mean ? you mean an empty form ?
I think one social function should work in this situation, but I didn't try it myself!
Regards,
Max
Thanks for your answer.
I want a function that check that one of the fields is inserted, but only works if insert one field first time
This is the procedure:
1. All fields are empty
2. Click on submit button
3. Validation is ok.
4. Insert one social field, for example Twitter.
5. Click on submit button
6. Validation failed. Twitter field ok, but the other fields remain mandatory
I hope you understand me.
thanks in advance
I want a function that check that one of the fields is inserted, but only works if insert one field first time
This is the procedure:
1. All fields are empty
2. Click on submit button
3. Validation is ok.
4. Insert one social field, for example Twitter.
5. Click on submit button
6. Validation failed. Twitter field ok, but the other fields remain mandatory
I hope you understand me.
thanks in advance
Ok, but none of your fields should be set to "required", I have just tested this, 2 fields and it works ok:
Regards,
Max
function one(el){
if(jQuery("#text3").val() || jQuery("#text5").val()){
return true;
}
return false;
}
Regards,
Max
This topic is locked and no more replies can be posted.