[OGo-Users] extended attributes

Adam Tauno Williams users@opengroupware.org
Sun, 03 Dec 2006 20:35:36 -0500


>> > how do I define extended attributes, that are radio buttons, url fields=
 or
>> > list boxes. for example SkyPublicExtendedPersonAttributes defines exten=
ded
>> > person attributes, type 2 is a checkbox, type 1 a text field, type 3 an
> email
>> > address. I tried to set types to 0, 4,5,6 as well, but they all seem to=
 be
>> > text boxes too. I think I have to encode the key/value pairs for the ra=
dio
>> > buttons and list entries in a different way, than for the other fields.
>> > Anyone can give me an example please?
>> http://docs.opengroupware.org/Members/whitemice/wmogag/ Page 27
> You are great, that was exactly what I was looking for, next time I'll tak=
e a
> look there before asking here.
> Well, I just only find it a bit unusual to have the multi select  =20
> field at type
> 9, and types 4-8 doesn't seem to be used.

Yep, I've got no idea why.

> something else I observed:
> - I have no labels defined yet
> - encoded the values: values =3D {key1=3Dvalue1; key2=3Dvalue2;};
> - when I then open a contact to set a value, I choose betwen the value1,
>   value2,... but when I then only want to take a look at the person
>   attributes, the webui presents me the key1, key2...

Yep.

> - so to make it consistent, I have to make it: values =3D {key1=3Dkey1;
>   key2=3Dkey2};

Exactly; As stated in the document "For a type 9 attribute multiple =20
values may be selected.  The value of the ?values? attribute is an =20
array of key value pairs defined like: { ab =3D ab; cd =3D cd; ef =3D ef; }.=
 =20
  It is the value to the left of the equality pair that is actually =20
stored, but the web interface is inconsistent about which is displayed =20
to the user so the left and the right of equality pair should always =20
be set to the same value."

> Is that intended to work that way?

No idea, but it does work that way. :)