Are you sure checkout_date_in and checkout_date_out are being submitted and that those are the correct variable names?
Also, if you want to redirect, just call redirect(...), don't return a dict with a redirect call in it. Anthony On Thursday, October 4, 2012 12:39:14 PM UTC-4, Andrew Evans wrote: > > Hello I am trying to validate a form entry against existing entries in my > database on form submission. But user_start and user_end are returning as > None Type. How do I get the values of a form using SQLFORM > > *cheers > > if form.accepts(request.vars): > for project in project_date: > start = project.date_in > end = project.date_out > user_start = request.vars.checkout_date_in > user_end = request.vars.checkout_date_out > if start <= user_start <= end or start <= user_end <= > end: > return dict(redirect(URL('error','availability'))) > else: > session.flash = 'form accepted' > return dict(redirect(URL('default', 'next'))) > > *cheers and ty > > > --