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"

Comments

mediafrenzy’s picture

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...

platypus media’s picture

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

Balefire’s picture

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 -

  1. copied the whole theme_location_form function into theme/garland/template.php
  2. renamed it garland_location_form

After several attempts I have:

if ($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

yesct’s picture

Status: Active » Fixed
Issue tags: +Location theming

marking fixed as it looks like the solution is working.

Also tagging as it is related to other issues regarding theming.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

radhika1’s picture

Title: How can I change wording? "a place of business, venue, meeting point" » meeting facilities, 

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.

meeting facilities