yourlist = [[u'John Doe', u'[email protected]'], [u'Mary Doe', u'
[email protected]']]
and in your validator
IS_IN_SET(yourlist, *multiple=True*)
multiple to render checkboxes.
On Friday, December 2, 2011, Kenneth Lundström wrote:
> You either have an multi select select item in the form or then you need
> to make as many field as the is e-mail addresses.
>
> Either:
> form.factory(
> Field('addresses', requires = IS_IN_SET=[[u'John Doe', u'
> [email protected] <javascript:_e({}, 'cvml', '[email protected]');>'],
> [u'Mary Doe', u'[email protected] <javascript:_e({}, 'cvml',
> '[email protected]');>']]))
>
> form.factory(
> Field('address1',
> Field('address2',
> and so on.
>
>
> Kenneth
>
> My values are not in a database but in a list:
>
> [[u'John Doe', u'[email protected] <javascript:_e({}, 'cvml',
> '[email protected]');>'], [u'Mary Doe',
> u'[email protected]<javascript:_e({}, 'cvml', '[email protected]');>']]
>
>
> how to get them from there?
>
> I want names to show up next to the check boxes, when selected to know
> which email address is corresponding in order to send a message to this
> email address.
>
>
>