When I choose "unlimited" for the number of values in the global settings of my location cck field, the node add/edit form presents the user with 2 location fields (by "field", I mean the numerous fields associated with a single location), then below those 2 there is a button to add another location.

My question: how can I make it so that only 1 location field is presented to the user (with the add more button below it) instead of 2?

Note: I'm using panels (panels 3) for the node add/edit form, so it'd be nice to accomplish this without needing to create a node-MYCONTENTTYPE-form.tpl.php just for this single purpose. However, if there's a way to use a tpl.php file within panels (like you can do with Views) to do this, I'd love to know how (perhaps panels automatically brings in tpl.php files associated with a specific field but I'm simply unaware of this functionality). I'm aware this isn't a panels issue queue though, so if the functionality is possible within the location module (before being sent to panels), that'd be great.

Comments

zmove’s picture

/subscribe, I'm looking to do the same thing, but I'm not using panel 3.

rooby’s picture

Status: Active » Fixed

This is a CCK issue, not a location issue.

For a patch to add this functionality see the following CCK issue - #530828: Provide "Add more values" button for fields (and multigroups) with fixed number of multiple values

Also note that it is quite unlikely that patch will ever be committed to CCK. See that issue for details.

Status: Fixed » Closed (fixed)

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

dreamleader’s picture

still learning where these things go.

rooby’s picture

@dreamleader:
You should open a new issue for different problems/requests. Especially seeing as this issue does not relate to your problem.

Also, people will usually not respond to issues with the status of "Closed (fixed)"
See http://drupal.org/node/156119 for more information.

What you want to do is add views filters for location city & state fields.

To do this when using location cck you have to first add a relationship between your location field and it's location. Without that you cannot filter on specific parts of the location. (I can't remember now exactly what the relationship is called.)

If you still have trouble with it best to open a new support request issue.

rooby’s picture

That's ok, you have to start somewhere.
No need to remove it.