[web2py] Re: How to cause radio buttons to auto deselect?

2017-01-11 Thread Sankhajit Das
i have used @auth.requires_login()  before def index():
which works perfectly,i.e.,first you have to login to give some input..  
But i want to save in my database how many people and their information in 
a database.. How may i do it? Pls help asap

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Anthony
Have you tried the radio widget -- SQLFORM.widgets.radio.widget 
(see http://web2py.com/book/default/chapter/07#Widgets).

Anthony

On Saturday, November 26, 2011 4:00:06 PM UTC-5, dlypka wrote:

 When I create several radio buttons in a web2py form, they do not auto
 deselect when another is selected. They all stay selected.  Do I need
 to add my own javascript code to do the auto deselect (so that only
 one radio button at a time stays selected)
 or does web2py have some support for this behavior?



[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Matt Gorecki
All of the input tags need to have the same name value.

input type=radio name=group1 value=Milk Milkbr
input type=radio name=group1 value=Butter checked Butterbr
input type=radio name=group1 value=Cheese CheeseBr

Matt


[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Anthony
More generally, if you give all the radio input elements the same value 
for the 'name' attribute, the browser will allow only one to be selected at 
a time.

Anthony

On Saturday, November 26, 2011 4:25:54 PM UTC-5, Anthony wrote:

 Have you tried the radio widget -- SQLFORM.widgets.radio.widget (see 
 http://web2py.com/book/default/chapter/07#Widgets).

 Anthony

 On Saturday, November 26, 2011 4:00:06 PM UTC-5, dlypka wrote:

 When I create several radio buttons in a web2py form, they do not auto
 deselect when another is selected. They all stay selected.  Do I need
 to add my own javascript code to do the auto deselect (so that only
 one radio button at a time stays selected)
 or does web2py have some support for this behavior?



[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread dlypka
Thanks - I had not noticed that fact hidden underneath the ASP.NET
controls all these years.

On Nov 26, 3:31 pm, Anthony abasta...@gmail.com wrote:
 More generally, if you give all the radio input elements the same value
 for the 'name' attribute, the browser will allow only one to be selected at
 a time.

 Anthony







 On Saturday, November 26, 2011 4:25:54 PM UTC-5, Anthony wrote:

  Have you tried the radio widget -- SQLFORM.widgets.radio.widget (see
 http://web2py.com/book/default/chapter/07#Widgets).

  Anthony

  On Saturday, November 26, 2011 4:00:06 PM UTC-5, dlypka wrote:

  When I create several radio buttons in a web2py form, they do not auto
  deselect when another is selected. They all stay selected.  Do I need
  to add my own javascript code to do the auto deselect (so that only
  one radio button at a time stays selected)
  or does web2py have some support for this behavior?