Add a setting to allow autocomplete province field to return code or full name.

james_g - October 13, 2009 - 06:11
Project:Location
Version:5.x-3.1-rc1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:abbreviation, auto_nodetitle, code, province
Description

I ran into a situation using auto_nodetitle where I needed the node name based off of the state. The maintainer of auto_nodetitle, for reasons stated here: http://drupal.org/node/126996, creates the node title during the form validation. This title is generated before the location module converts the full province name into the code to be stored in the database. Because of this, it attempts to title the node with the entire province name. Hitting edit, the code is in the autocomplete field (gathered from the database) rather than the full name. Submitting again renames the node with the code.

In my situation, I found the best solution was to create an administration setting for the location module that let me choose whether I wanted the autocomplete field to return matches based off the full name or the code.

Although this solution solved my issue in an indirect manner, I felt that this might be useful to other people so I'm including the patch.

AttachmentSize
location_module_autocomplete_settings.patch1.07 KB
location_admin_inc_autocomplete_settings.patch1.04 KB

#1

Summit - November 5, 2009 - 10:10

Would this also be the same for D6?
Subscribing,
greetings,
Martijn

 
 

Drupal is a registered trademark of Dries Buytaert.