Quickform Element Conditional Rule
| From: | Aaron Wormus | Date: | Thu, 20 Jan 2005 15:12:03 +0000 |
| Subject: | Quickform Element Conditional Rule | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-17036@lists.php.net to get a copy of this message | ||
I need to make a clients side validation rule that depends on the state of another form element something like:
if (document.form.input1.value == "Hello" && document.test.input2.value == ""){
alert("error");
}
I know this is easy when the elements are in a group, but these elements aren't. Does anyone have some quick code, or an idea of how I can create a custom rule for this?
Aaron