Hi
Love the module and have GMAP working with views. However I really need to theme the Location fields ( and particularly the text saying "If you wish to supply your own latitude and longitude, you may enter them above. If you leave these fields blank, the system will a ............" ) that appear when creating a location enabled node.
The reason it is essential for me is that my content type NEVER has an address, only creator supplied lat/lon. I have managed to hide all fields except Lat and Lon so the text above is going to confuse my contributors.
Ideally it would be nice to also break into the "Location" fieldset with other CCK fields but this is not critical.
Any pointers would be appreciated.
Thanks for your assistance,
Dave
Comments
Comment #1
El Bandito commentedOK. Starting line 314 in location.module :
I can obvious edit the module, but I know this would make me a naughty boy. What would be the approved way to change this ?
Cheers
Dave
Comment #2
munikho commentedWell, you could just use css no?
Comment #3
imrook commentedYou can probably go about implementing some kind of form_alter or theme function, but I find theming forms and CCK to be kinda difficult. An easy way to get this done is to use the String Overrides module: http://drupal.org/project/stringoverrides
Comment #4
seanbI wanted to replace the field description with my own text. I can't really find out how I'm suppose to do this? I already tried adding a help text to the CCK field and hiding the default description with CSS. The CSS class of the default description text is the same as the classes for the cck help text, so that didn't work.
The way I see it there are a couple of options to configure these texts:
Of course one can think of other solutions to the problem! Let me know what you think.
Regards,
Sean
Comment #5
tmcnamara98 commented[I had posted about removing the map and lat/long entirely, but I see that this can be done via access control]
Comment #6
yesct commentedtagging
Comment #7
rooby commentedform_alter doesn't work for the individual location fields as they are created after that.
You have to use hook_locationapi().
For examples see
#367218: How to force a default on Location Name and disable/protect form input
#443434: Change title of location_cck fields
For documentation of hook_locationapi follow this issue and I hope to have time to document it properly soon. - #480004: Document hook_locationapi()