How can I change wording? "a place of business, venue, meeting point"
mediafrenzy - March 18, 2008 - 06:59
| Project: | location (API, module) |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm creating a sports site with drupal gmaps and location as a main feature. How can I change the wording that is placed on the location choice section of the content submission page? I'd rather not modify the location.module code itself.
"e.g. a place of business, venue, meeting point"

#1
Anyone know how to do this? I'm needing to change it to a sports specific phrase, instead of prompting the user for "a place of business, venue, meeting point" etc...
#2
If I'm understanding you correctly, you want to change the text for "location name" in your form, correct? You'll need to override functoin theme_location_form() and add in some logic to look for $form['location']['location_name'] and change the description.
Mike
#3
I'm coming from an ASP Classic background (without having touched PHP since v3) and tentatively finding my way into PHP5. I have the Pro Drupal Dev book and working my way through that which is a great help. I'm sure that this is probably not the correct way to do this but this is what I did -
theme_location_formfunction into theme/garland/template.phpgarland_location_formAfter several attempts I have:
<?phpif ($field_name == 'name') {
$form[$field_name]['#description'] = 'My new description';
}
?>
just above
$description = $form[$field_name]['#description'];. It works, but if someone could point out if I'm going about this in the wrong way and the correct way of doing this I would appreciate it. Unfortunately I could not work out how to do "...add in some logic to look for $form['location']['location_name']..." in the reply from ixlr8