Quickform - shipping address same as billing checkbox
| From: | Erik Heerlein | Date: | Thu, 21 Oct 2004 18:22:47 +0000 |
| Subject: | Quickform - shipping address same as billing checkbox | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15026@lists.php.net to get a copy of this message | ||
I have a form where I ask for a customer's billing and shipping address. I also have a, "Check here if your shipping address is the same as your billing address" checkbox.
I have "Required" rules applied to all of the fields for both billing and shipping. What I was wondering is if there is a way to disable the required rules for the shipping address fields if the customer has checked the "Check here if your shipping address is the same as your billing address" check box.
I'm thinking the logic would go something like:
// if the $same_as checkbox is NOT checked
// apply the "required" rules for the shipping address fields
Also, I've heard others recommend checking the PEAR Archives but I cannot find a link to these archives. Thank you for your time.
- Erik Heerlein