Hi,

I am trying to put together a simple node that adds longitude and latitude data to each node.
how do i remove the country drop down menu, all i want is the map and the longitude and latitude fields..

Also, how do I make adding a long/lat compulsory?

Thanks in advance for any help..

Cheers
Stephen

Comments

bdragon’s picture

Country is required because many things in location require a country to determine what functionality to use. Don't know of an easy way to bypass this.

However, if you're only interested in latitude and longitude, I believe there's some other projects that just do this. (Or you can make one using the 'locpick' behavior of gmap.)

madpeacock’s picture

thanks, i will look into locpick..

madpeacock’s picture

As I am not using any Location functionality except lon/lat picking it can use USA as the default for all nodes, that does not affect me. all I really want to do is hide the field, get it off my form..

could this be done with a custom module that hides that field somehow?
can one module hide the fields another module is trying to add?

yesct’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +location theme edit form, +Location theming

you might be able to use the force default country setting, and theme the drop down menu away. Are you just doing New York (ny) locations? If you are always in the same country, this might work for you. also try searching for other issues that have "form_alter" in them, or tagged with location theme edit form. I'm Tagging this post too.

Post back if you still need help with this.

Anonymous’s picture

Title: cant remove country drop down from ny node form » Add 'Do not collect' option to country
Version: 6.x-3.0 » 6.x-3.x-dev
Component: User interface » Code
Category: support » feature
Status: Postponed (maintainer needs more info) » Active

Request the option to not have to set a country for every single node location.
I too am creating nodes with just a latitude and longitude as I only need them to display on a map, having to select a country as well is annoying...

If country is needed for other functionality, users can set it to required, but we should at least have a choice in the matter.
I couldn't find any modules that just allowed you to add a marker to a node to be displayed on a map, and we shouldn't have to code our own solution either.

Thanks!

yesct’s picture

Status: Active » Closed (won't fix)

bwpanda, look at the geo module.

madpeacock, did you try using the collection settings? Did the suggestion in #4 (force default and theme it away) work?

seanberto’s picture

Hmmm...Not sure if this is a bug, but if my collection form only has the country select box and the gmap chooser, the country value does not change when I click on a different country on the map. Is this by design?