On Dec 22, 2010, at 12:22 PM, Johann Spies wrote: > On 22 December 2010 21:32, mdipierro <[email protected]> wrote: > I think because > > Field('id', requires = IS_IN_SET(ids), > > id in the form is a string and ids in the set are integers. > > > Thanks for your answer. Changing the definition to > > form = SQLFORM.factory(Field('id', 'integer', requires = IS_IN_SET(ids), > label = "Which event (number)?") > > did not solve the problem however :( > > How do I debug this?
When accepts() returns False, look at form.errors. It's a dict (Storage, actually, but you can treat it as a dict) that is keyed, typically, by field names, with error messages as values. (accepts() will also return False before the form has been submitted, but in that case form.errors is empty.)

