multi-value selection in customfield module (patch)

sergii

Joined: 2006-10-29
Posts: 16
Posted: Mon, 2006-10-30 06:51

I've added support to multi-value selections to customfield, in admin page it adds a checkbox "multiple selections allowed" and if checked on edit page creates "<select multiple>"

The patch is attached.

Comments:

1. data format (in database) is incompatible with old customfield :(
one will need to run an appropriate UPDATE g2_PluginParameterMap when upgrading
or a patch could be changed to add an option in a compatible way, which won't be nice
2. I couldn't figure out to pass multiple selections from gallery to the template and back easily,
and used javascript helpers here
3. diff -uBbt, use patch -l to apply
4. it also adds customfield support to other DataItem's, not only PhotoItem
(I couldn't figure out, for the life of me, why a photo can have a "photographer" or "location" field, but a video clip cannot :) )

AttachmentSize
customfield-multi.diff_.txt8.82 KB