My model contains:
db.define_table('recipe',
 
SQLField('last_action_ts','datetime',required=True,default=now),
 
SQLField('ability','string',length=1,required=True,requires=IS_IN_SET(['B','C'],labels=['straightforward','slightly
adventurous'])),
                SQLField('amount','integer',required=True),
...
                migrate=False)

My controller contains form=SQLFORM(db.recipe)

My view contains {{=form}}

But the displayed form has an INPUT type="text" for ability, shouldn't
it be a SELECT?

Looking into it, it seems the SQLFORM __init__ contains "elif
hasattr(field.requires,'options'):" which must be true to create the
SELECT and this is False for the "ability" field.

I'm sure I'm doing something silly but I can't see it. Any ideas
please?

Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to