Received: by 10.54.133.5 with HTTP; Thu, 8 Dec 2005 07:41:28 -0800 (PST)
Date: Thu, 8 Dec 2005 07:41:28 -0800
From: Dave Greenberg <caché>
Reply-To: "CiviCRM: General discussion around development" <caché>
To: Russell McOrmond <caché>
Subject: [Crm-dev] Re: [CS dev] Canadian postal code lookup..
Cc: CiviCRM Developer Community <caché>,
Content-Type: text/plain; charset=UTF-8; format=flowed
Delivery-Date: Thu, 08 Dec 2005 10:43:14 -0500
X-Forwarded-For: caché caché
Received-SPF: neutral (gmail.com: 22.214.171.124 is neither permitted nor denied by best guess record for domain of caché)
DomainKey-Status: bad (test mode)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
List-Id: "CiviCRM: General discussion around development"
You may want to join the CiviCRM developer mailing list going forward
- as it is a good resource for sharing and getting feedback, etc. -
Given that you want to persist EDID info for each contact - setting up
a custom field with Data type = Integer and HTML type = Select makes
sense. You will specifiy option labels (eg Ottawa South) and option
values (eg 35064) for each choice. The screens will behave as you
stated - users will see a <select> element w/ options during add/edit
and the text label when viewing a record.
You can populate the EDID options using our
crm_create_option_value($params, $customField) API if you don't want
to deal w/ adding them in the UI. More info is here:
On 12/7/05, Russell McOrmond <caché> wrote:
> Dave Greenberg wrote:
> > Hi Russell,
> > I suspect other on this list will have good input on this,
> I'm not a member of the mailing list, but someone who posted a question
> to the website. Thanks for your response. I hope any other replies
> will be copied to me directly, or posted as replies to the website
> > * Although there is no limit on number of options for a custom field -
> > the UI only allows you to add 10 when you first create the field. You
> > can then add as many more as you like in the UI (Edit Multiple Choice
> > Options action link). HOWEVER, doing this for 308 options will be a
> > bit painful.
> I already have the data in existing databases, and would just be
> automatically adding the information to the CiviCRM database in whatever
> is thought to be the best place.
> > * If you don't have other reasons to persist the EDID for voters,
> EDID is critical information to retain for all members, and is what
> is then used to indicate what MP to contact after the election. The
> campaign will often be asking people to send a letter to their MP about
> various issues, making the EDID far more useful pretty much any other
> information (other than their email address ;-).
> If I store as an integer then when users look at their own
> information it would show the number rather than a human readable
> version (IE: 35064 is the EDID number I need to index into databases,
> but I'd prefer to automatically show "Ottawa South" when displaying to
> normal people).
> Am I correct in assuming that if I use a "selection" custom field
> then this will mean that a text version of the option is displayed, a
> pulldown is there when editing, without having to do any custom coding?
> On the other side, sending 308 options to the browser each time a
> pulldown option is to be displayed is not going to be efficient. This
> is an argument for using a simple integer.
> Russell McOrmond, Internet Consultant: <http://www.flora.ca/
> 2359+ Canadians oppose Bill C-60 which protects antiquated Recording,
> Motion Picture and "software manufacturing" industries from change...
Try CiviCRM - http://www.openngo.org
Crm-dev mailing list