Is there the ability to but N/A in the state province field?
beckyjohnson - May 26, 2009 - 17:41
| Project: | Addresses |
| Version: | 6.x-1.05 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is there the ability to but N/A in the state province field? I'm doing some data input for my company and this data includes addresses but not all people gave their state/ province. Example, someone lives in Salo Finland but she didn't put her state/province. She put N/A. I looked it up and put Finland Proper but the node still won't let me save.
I need a way around this....
Is it possible?
Becky

#1
You could make the province field not required, and just leave it empty.
else you could go into the code
(I'm sorry i don't have a developer copy at this machine, so its not tested at it isn't a patch format. ++ is the lines i have added)
modules/addresses/addresses.inc line 599
<?phpif (function_exists($function)) {
$provinces[$country_code] = $function();
++ // prepend the Not available to the province array.
++ $provinces[$country_code] = array('N/A' => 'Not Available') + $provinces[$country_code];
}
?>
#2
sorry i found out I could make the field as un-required and that solved the problem.
Becky
#3
Sweet. For completeness sake, I'll try out your code too.
Thanks,
Becky