English 中文(简体)
web2py - display radio button into my form
原标题:
  • 时间:2009-11-15 08:32:41
  •  标签:
  • web2py

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.





相关问题
how can I make between query with web2py.DAL?

I m trying to make a query function that accepts two datetime.date object(start_date and end_date), and return all records with a related field that s between start_date and end_date. However, I found ...

Is Google App Engine right for me?

I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store ...

Django for web2py developers

Now that I ve gotten relatively familiar with web2py, I d like to give Django a go. What are the main differences? What would be the most efficient way to get started taking into account web2py ...

Errno 5 caused througth web2py

The I/O error errno 5 are thrown when "print" is used. I don t know why?? server: redHat

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: ...

How to pass a JSON object to web2py using JQuery Ajax

I ve used this method in .NET to pass data back and forth between client and server using JSON objects (both ways). I really liked the method and am looking to do something similar with web2py. ...

web2py - load part of data

i have table called "type" which contains data "family,individual" i want in some pages load individual only into type drop-down and in another pages load both How can i do that?? Thanks in advance

热门标签