What is the definition for the field in question? Probably you have
type='string' but it should be type='list:integer'

On Sep 5, 3:56 pm, Fran <[email protected]> wrote:
> I'm running latest stable release (Bzr r2247) & trying to use this for
> a multiselect field:
> widget = SQLFORM.widgets.checkboxes.widget
>
> But it's not working properly.
> The create form works fine - the widget appears to work fine & the
> database is indeed populated properly with the expected:
> '|8|9|7|'
> This displays fine in read screens.
> However it fails to work in update forms - the checkboxes don't show
> up as checked & so if the record is saved then the previous checkbox
> states are lost :/
>
> I tracked this down 
> to:http://bazaar.launchpad.net/~mdipierro/web2py/devel/annotate/head:/gl...
> (value = '|8|9|7|')
> values = not isinstance(value,(list,tuple)) and [value] or value
> (values = ['|8|9|7|'])
> k in values
> (False)
>
> The old, commented, code works fine though:
> values = re.compile('[\w\-:]+').findall(str(value))
> (values = ['8', '9', '7'])
> k in values
> (True)
>
> I think the change was made to avoid a relatively slow call to 're'
> right?
> However it seems not to work properly...
>
> Many thanks :)
> Fran.

Reply via email to