How would I go about changing the titles of location_cck fields?
i.e. I'm using the 'City' field in my nodes, but would instead like it to be called 'Area' when users enter data into it... Is this possible?
How would I go about changing the titles of location_cck fields?
i.e. I'm using the 'City' field in my nodes, but would instead like it to be called 'Area' when users enter data into it... Is this possible?
Comments
Comment #1
yesct commentedhmmm. Theme or form_alter?
try looking at issues tagged with:
location theming
or
location theme edit form
Comment #2
rooby commentedNote that this code is created for the 3.1 version or current dev.
The location module provides a hook for this, called hook_locationapi(&$obj, $op, $a3 = NULL, $a4 = NULL, $a5 = NULL)
The field_expand $op is where locations fields are created and you can use that to modify the different fields of a location.
Here is an example that sets the title of the city field to Area:
You need to create a custom module and add this hook.
Comment #4
bedot commenteduse string override module
Comment #5
trackleft commentedThis does not work in Drupal 7 unless I am missing something
Comment #6
boblesurfeur commentedhave you checked the Weight of your module ?
Mine begins with an F so it is executed before the module location.
Thanks Rooby for the tip btw.