However you are correct that it is db related - if I remove the requires
directive i.e:
form=SQLFORM.factory(
Field('dogid', 'integer')
)
Then the form will post successfully (if I type in an integer).
I did wonder if the lookup list was causing the types to be confused, so
tried:
form=SQLFORM.factory(
Field('dogid', 'integer', requires=[IS_IN_DB(db(db.dog), 'dog.id')])
)
This behaves the same as the lookup case (i.e fails with 'wrong datatype
for id'), if I type an id known to be in the database.
--