Hi guys! So I have a validation script I made a while ago. I can pass the script "this" as the form identifier to get it going on the right element (with(this)). But what if I want to call this validation function from a place other than the form itself, let's say, in an another request that wants to know if the form is valid?
function validate_form(thisform) {
with (thisform) {
validate_fullName(fullName);
validate_email(email);
if (isName&&isEmail) {return true;};
return false;
};
};
So basically I want to call this function in another function to check if the form is valid or not:
if(validate_form(WHATDOIPUTHERE?)){ // STUFF; };
Thank you so much!!