开发者

web2py - display radio button into my form

i want开发者_如何转开发 to display a radio button into my from so i did:

 SQLField('active',requires=IS_IN_SET(('True','False')),widget=SQLFORM.widgets.radio.widget)

but it display an error:

AttributeError: 'NoneType' object has no attribute 'widget'

So how can fix it??

Is there any solution to display radio buttons into my from?? Thanks in advance

Neveen Adel


You might want to try

SQLField('active',requires=IS_IN_SET(['True','False']),widget=SQLFORM.widgets.radio.widget)

That works for me.


You may be running a very old web2py version. Please bring this up on the web2py mailing list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜