PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Drupal Addresses Computed Field

January23

I was addresses module but using the values of country and city in views or search or any custom module is a headache because the module saves the country / city / providence values in initials.

To overcome this issue I created to cck computed fields save the country and city values in it respectively.

To get the value of the country and city use the below variables:

$country = $node->field_jobseeker_address[0]['country'];

$city = $node->field_jobseeker_address[0]['providence'];

where ‘field_jobseeker’ is my cck field type ‘address’.

Check a working example here http://drupal.org/node/818928#comment-3171054

posted under Drupal

Email will not be published

Website example

Your Comment:

 

13,816 spam comments
blocked by
Akismet