09-08-2009 09:22 PM
Hi there all,
I am trying to create a field that is basically a ObjectChoiceField but allows for multiple selects. What would be the appropriate way to go about creating such a field?
09-09-2009 12:46 AM
You could try the ObjectListField along with the inherited field method MULTI_SELECT like so :
--If u are satisfied with the solution , please mark the thread as solved--
09-09-2009 12:23 PM
ListField only allows a continuous selection when using MULTI_SELECT.
I have another another suggestion. In your ObjectChoiceField, you have to turn each Object into a String for display. If you prefix each String with
then you have a little check box. Then, when an item is selected, you prefix the String with
instead. Thus it looks like the users are 'checking' each item. When they have finished, you need to go through the choices and look for the ones that are prefixed with Characters.BALLOT_BOX_WITH_CHECK and process these.
Just a thought. I've done something similar with ListField, since it only provided continuous selections.
09-10-2009 12:03 AM
09-10-2009 05:45 AM
Guys, got to give credit where it is due, I saw the idea in the following KB article....
How To - Create a ListField with check boxes
Article Number: DB-00471
@belberry - hope this is enough code for you.
01-21-2011 01:48 AM
My requirement is to select multiple contacts in auto complete Field Or any List Box Field .How can iSelect multiple contacts .and to use the selected contact 's details