Closed (outdated)
Project:
Location
Version:
6.x-3.0
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2010 at 22:08 UTC
Updated:
28 Jul 2016 at 17:25 UTC
Jump to comment: Most recent
Comments
Comment #1
joelstein commentedI would also like to know this.
Comment #2
hutch commentedYou could create a node-type called say 'venue' which uses location cck to define a venue. Then add a Node reference cck field to your event which can be configured as a dropdown (might do autocomplete field too, I haven't got an example to hand)
You will need to create any venues first.
Try it out on a development site first ;-)
Comment #3
joelstein commentedI thought of that solution, also, but it provides a poor, confusing user experience.
I have an idea how this could work. On the node form, search for previous nodes authored by this user, and grab those locations. Then, add a new select field above the existing location fields which lists the previous locations, as well as a default option "New location". Send the location options to the page via drupal_add_js() as a setting. When the user selects a previous location, autofill the fields with these values.
With a simple hook_form_alter, I was able to get this working on my site. Wouldn't take too much work to make a patch, but it gets more complicated when thinking about all the different ways that somebody could have Location configured.
I'll paste it here for anyone who wants it. In my configuration, I was using the Location CCK field, and since the "name" attribute was required, I could easily just show the name value.
Here's the javascript:
Comment #4
rwt commentedIs there any module for that? How would I port your code to Drupal 7? Thanks
Comment #5
legolasboClosing old D6 issues as D6 is end of life
Comment #6
mattbk commented@legolasbo, what's the protocol for requesting this for D7? Should the version on this issue be changed, or should a new issue be opened with the new version?
Comment #7
legolasbo@mattbk,
That depends on the type of issue and it's relevance to currently supported branches. If we are for instance talking about a bug which is still present in a newer version, then the issue should be re-openend and assigned to the last (currently supported) version where the issue occurs. Feature requests are usually re-assigned to the current development branch.
As for this issue, it is filed as a support request, but feels more like a feature request (for location autocompletion), which would make re-opening, changing the type to feature request and setting it to 8.x seem a reasonable choice. However, it has had very little activity in it's lifetime and only contains some ancient copy-pasted code which doesn't make the comments in question really valuable. I would therefore choose to open a new issue (feature request) for the d7/d8 branch, write a thorough issue summary and reference this issue.
I hope the above helps you out. If you have any more questions, feel free to ask.