Drupal Questions & Answers

Ask and answer Drupal related questions! No question too simple or complex!
matshep1's picture
Asked by on Fri 6th Feb 2009
CCK Link to Map Field

Hi there,

I am trying to use the CCK Link to Map field with nodeprofile to show a link to a Google map generated from the current profiles address. What I would like to do is set the value of this field by joining the address values in 4 or 5 other text and select fields on the nodeprofile form. e.g Address Line 1 + Address Line 2 + City + Province etc…

What I really want is this to show up on the users profile so the administrator can click on the link and get a Google map of the the users business address for deliveries. So far I have been trying to set the default value of the field by putting the following in the default value PHP code section.

return array(
0 => array(‘value’ => $node->$field_address_line_10[‘value’])

I’m no PHP wizard so it’s trial and error for me at the moment. I tried that to see if I could even get the first field value in to the map link field, but that didn’t work for me. What I figure is once I figure out how to get one variable in there I can concatenate all the variables I need in to one.

Is this possible?


Commenting on this Drupal Question is closed.