I have a situation where i want to set default values for the location field on the node add form

I have tried this but it doesn't work:

// Set the Geo Location of this sighting
$form['field_name']['und'][0]['#default_value']['latitude'] = '45.1';
$form['field_name']['und'][0]['#default_value']['longitude'] = '-1.3';

Ideally i want to then set the location of the pin on load, any help appreciated.

Comments

legolasbo’s picture

Status: Active » Closed (outdated)

Closing support tickets that have been inactive for over a year to clean up the issue queue. Please reopen if this is still an issue.