is there a way to check if all form fields are filled in? i can do it singular but just need to know if it can be done
form validation
Collapse
X
-
Tags: None
-
-
i have a form validation method that i learned already....i cant find if its possible to validate a form as a whole rather than checking if a field is filled out?Comment
-
i think im going about this the wrong way.....is it possible for javascript to do this i.e. say if the form returns no errors then do something else?Comment
-
ok ive done the validation..... is there a way i can get a value thats in javascript into a php.....i want to get the value that goes into obj2 into a php var......is it possible?
Code:<script> function CopyValue(obj1, obj2) { var visibleField = obj1; obj2.value = visibleField.value; } </script>Comment
-
Yes, either pass it through the URL:
or set a hidden field value in the form to the variable value:Code:location.href="file.php?var="+encodeURIComponent(jsvar);
Note:encodeURIC omponent() encodes the value in case there are any special characters.Code:document.getElementById("hidden").value = jsvar;Comment
-
Comment