Adding custom field options in contact screen

1,195 views
Skip to first unread message

jnan...@gmail.com

unread,
Feb 4, 2009, 7:17:47 AM2/4/09
to Google Contacts API, anjal...@metacube.com
We are looking to use google apps for our organisation.For that
purpose we are learning and looking at different customizations that
we would want.

The contacts screen contains various sections like personal, other. In
each section there are combo boxes with list of values like Email,
Phone, Fax, Pager. How can I add a custom option over here, like for
ex I want DOB, Anniv Date to come in the combo.

Is this possible? If yes could anybody provide me with the information
and any examples.

Will appreciate quick response.

Thanks
Anjali


jnan...@gmail.com

unread,
Feb 5, 2009, 12:53:24 AM2/5/09
to Google Contacts API
Can anybody comment on this? Is this possible?
thanks
anjali

Zindus Development

unread,
Feb 5, 2009, 4:01:06 AM2/5/09
to google-co...@googlegroups.com
It depends whether you are asking a technical question or a commercial
question.

If you are asking a commercial question like "if google will do this for
us we may consider using Google Apps" then I have nothing to say because
I don't work at Google.

If you are asking technical question "is this possible" then the answer
is 'maybe'. One approach would be to put DOB and anniversary in the
extended properties of a contact:
http://code.google.com/apis/contacts/docs/2.0/reference.html#ProjectionsAndExtended

Of course you also need to modify the UI. If your organization uses
firefox you may create an addon or modify one like this to do the job:
https://addons.mozilla.org/en-US/firefox/addon/6076

I am not sure about Internet Explorer but I guess a similar approach is
possible.

Regards -

Leni.

Anjali Jain

unread,
Feb 5, 2009, 7:11:05 AM2/5/09
to google-co...@googlegroups.com
Hello Leni,
 
I appreciate and thanks for your reply.
 
I guess extended property allows a single name value pair. What I am looking at is adding client specific options in the combo. Pls see the image snapshot attached. The combo has three entries Home, Work and Other. Now if I want to add say DOB, Anniv Date, etc in the combo list then how can i do that?
 
I downloaded and installed the add on that you have provided, but I am not sure how it can help me in incorporating the desired combo box.
 
One issue unrelated to this thread, i tried to add some extended properties to a contact with java client library (with projection full) but when I opened the contact in Gmail screen, I did not see those extended properties coming up on UI. Is this a bug or I am missing something?
 
Hoping to hear from you soon.
 
thanks
anjali
contacts.gif

Zindus Development

unread,
Feb 5, 2009, 1:34:31 PM2/5/09
to google-co...@googlegroups.com
Hi Anjali -

> I guess extended property allows a single name value pair.

A contact can have more than one extended property. There is a limit,
I'm not sure what it is - '10' is a number I recall reading somewhere.

You can extended property name/value like this to do the job:
name=mycompany
value=<myxml><dob>blah</dob><anniversary>blah</anniversary></myxml>

> One issue unrelated to this thread, i tried to add some
> extended properties to a contact with java client library
> (with projection full) but when I opened the contact in Gmail
> screen, I did not see those extended properties
> coming up on UI. Is this a bug or I am missing something?

Extended properties don't appear in the Gmail UI.

> The combo has three entries Home, Work and
> Other. Now if I want to add say DOB, Anniv Date, etc in the combo
> list then how can i do that?

This is the hard part. You would have to write some javascript code
which would run at the same time as the user interacts with Gmail. Your
code would on the one hand use the Contacts API to read your additional
fields and on the other modify the Gmail UI to provide a way for the use
to set/get those fields. So you would need to learn about how to
develop mozilla addons. I don't suggest this would be easy but I think
it'd be a feasable thing to do. This is the wrong mailing list for
talking about developing firefox addons.

Leni.

Anjali Jain

unread,
Feb 9, 2009, 12:03:35 AM2/9/09
to google-co...@googlegroups.com
Hello Leni,
 
Please find my replies below:
 
thanks
anjali

On Fri, Feb 6, 2009 at 12:04 AM, Zindus Development <google.com@zindus.com> wrote:

Hi Anjali -

 > I guess extended property allows a single name value pair.

A contact can have more than one extended property.  There is a limit,
I'm not sure what it is - '10' is a number I recall reading somewhere.
 
Yes you are right

You can extended property name/value like this to do the job:
name=mycompany
value=<myxml><dob>blah</dob><anniversary>blah</anniversary></myxml>

 > One issue unrelated to this thread, i tried to add some
 > extended properties to a contact with java client library
 > (with projection full) but when I opened the contact in Gmail
 > screen, I did not see those extended properties
 > coming up on UI. Is this a bug or I am missing something?

Extended properties don't appear in the Gmail UI.
 
Then what is the purpose of extended properties if they are not viewable? You mean I can't see extended properties in the UI??
 

 > The combo has three entries Home, Work and
 > Other. Now if I want to add say DOB, Anniv Date, etc in the combo
 > list then how can i do that?

This is the hard part.  You would have to write some javascript code
which would run at the same time as the user interacts with Gmail.  Your
code would on the one hand use the Contacts API to read your additional
fields and on the other modify the Gmail UI to provide a way for the use
to set/get those fields.  So you would need to learn about how to
develop mozilla addons.  I don't suggest this would be easy but I think
it'd be a feasable thing to do.  This is the wrong mailing list for
talking about developing firefox addons.
 
 
Thanks !
 
But Leni, when you are building you web application, it is basic requirement that you would like to have your own web pages/ or google web page customized according to your requirements. Does not  google allow you to do any of these? From your reply, it seems that second option (customizing google page ) is not possible, but can't we host our own web page on to google app ?? (offcourse in our domain).
 
 
Also, I will definitely post this query separately to google folks!
 
Anjali

Zindus Development

unread,
Feb 9, 2009, 12:35:18 AM2/9/09
to google-co...@googlegroups.com
Anjali Jain wrote:
> Then what is the purpose of extended properties if they are not viewable?

extended properties allow non-google client software to associate data
with a contact. Indeed many/most clients might not want that data to be
visible in the Gmail UI.

>> You mean I can't see extended properties in the UI??

Not as far as I understand it.

Leni.

Reply all
Reply to author
Forward
0 new messages