Hi,
I want to build form where user can edit or insert many records. I
prepare form where are many rows of INPUT fields and this fields have
same names. After send this form a receive in
request.vars['INPUTs_name'] list of filled in values. It is ok. But
when I use validator it don't let pass anyone value and all form
fields fill in by whole list of values. Is there any trick how to make
it work or different way how to get this functionality. Thanks for
help.

def sample():
  form = FORM(TABLE(),INPUT(_type='submit'))
  for i in range(1,3):
         form[0].append(TR(INPUT(_name='var', requires=IS_TIME())))

  if form.accepts(request.vars, session):
                response.flash = 'accepted'
  elif form.errors:
                response.flash = 'form has errors'
  else:
                response.flash = 'please fill the form'

  return(dict(form=form))


works just with IS_TIME() validator. with other one it make error. I
think that is cause validators can't works with lists of values.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to