> > if radio1 checked: > then deg_or_rad is checked against range (-4:4) > if radio2 checked: > then de_or_rad is checked against range (-360:360) > > Can I do this in web2py without using javascript ? > > Why you should use javascript?. I think you can change the validator accordingly by reading the request.vars object before processing the form:
if request.vars.radio1: db.mytable.mydata.requires = IS_INT_IN_RANGE(-4, 4) elif request.vars.radio2: db.mytable.mydata.requires = IS_FLOAT_IN_RANGE(- 360; 360) else: <default validator> -- --- 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/groups/opt_out.