Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
legolasboClosing support tickets that have been inactive for over a year to clean up the issue queue. Please reopen if this is still an issue.