Download & Extend

Is there the ability to but N/A in the state province field?

Project:Addresses
Version:6.x-1.05
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#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

<?php
     
if (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

#4

Status:active» closed (fixed)

Since this was resolved the same day it was opened, marking as closed.

#5

Check this out.