Thanks James, I appreciate your explanations. After some fumbling
around I got it work with basically the same thing:
billing_first: {
required: function() {
return
$("[name=billing_addr]:checke
Try changing it so it's:
required: function() { return $("[name=billing_addr]:checked").val()
== 0; }
and remove your click binding function.
This makes the radio check done on runtime.
Doing: return billing_address == 0;
will probably only evaluate "billing_address" when the rules are
defined
Thanks James I appreciate you replying. I'm still having some
trouble, even with your additions. I changed the checkbox to radio
buttons. I added this code snippet to get the value of the checked
radio. Yes == 1 and No == 0, if the user selects No (0) then the
billling address fields need to be
Something like:
rules: {
first: "required",
last: "required",
..
billing_first: {
required: function() { return billing_address == 1; }
},
billing_last: {
required: function() { return billing_address == 1; }
},
billing_first: {
4 matches
Mail list logo