>From the manual there is no reason this should not work, but the form
is accepted even with the empty field. Why? Thank you
carlo
controller:
def index():
form=FORM()
if form.accepts(request.vars,session,formname='test'):
response.flash='form accepted'
elif form.errors:
response.flash='form has errors'
else:
response.flash='please fill the form'
return dict()
view:
{{extend 'layout.html'}}
<form>
<input name='text' type='text'/>
{{=INPUT(_name='prova',_type='text',requires=IS_NOT_EMPTY())}}
<input type='submit'/>
<input type='hidden' name="_formname" value="test"/>
</form>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---