Contributions
Disallow PO Boxes
Simply add this function to includes/form_check.js.php:
function check_pob(field_name) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.match(/^p.?o.?sbox/i) ) {
error_message = error_message + "* " + 'Your Street Address must not be a PO Box.' + "n";
error = true;
}
}
}
And add this line to the function check_form:
check_pob("street_address");
| 2 Sep 2005 |
Simply add this function to includes/form_check.js.php:
function check_pob(field_name) {
if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
var field_value = form.elements[field_name].value;
if (field_value.match(/^p.?o.?sbox/i) ) {
error_message = error_message + "* " + 'Your Street Address must not be a PO Box.' + "n";
error = true;
}
}
}
And add this line to the function check_form:
check_pob("street_address");
Note: Contributions are used at own risk.
