Closed (fixed)
Project:
Location
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2011 at 01:15 UTC
Updated:
3 Dec 2011 at 01:16 UTC
I need to set the default node location to be the authors location. What is the best method to achieve this in the Drupal 7 version? Should I use php as a default value for the field itself and pull out the values directly by loading the current $user object? Or perhaps an add-on module that could use hook form alter?
I did see some solutions for Drupal 6 in this post - http://drupal.org/node/377600, I will be looking more carefully through them soon and report back on my progress, but If anyone has made progress on this for 7, or has a working solution I would love to see it / have it.
Thanks!!
Comments
Comment #1
sol roth commentedThe drupal 6 module linked to on this post http://drupal.org/node/377600 still works for Drupal 7, It may need some modifications but the functionality still works, so it's an awesome place to start.
Comment #2
ankur commentedIt looks like you have a start. My personal approach would probably be to implement this as a one-off in a custom module that sets the default to the author's location.