I have an SQLFORM.factory and I would like to have a form clear/reset button that wipes out the form but I cannot get some of the functionality I need. The form is mostly simple text fields with IS_NOT_EMPTY validators; if I submit a partially complete form, the little red error messages pop up saying to fill in the incomplete fields. However, if I click my 'Clear Form' button, the error messages remain and the text fields are reset to the user-entered values that were submitted, i.e. fields that were not empty on submission are not blanked out. I expect a form reset button to clear *all* text (not just what's been entered since the last submission) and I want the form errors to be reset too. Is there something in web2py forms that will accomplish what I want? If not, how would you suggest implementing this? My current Clear Form button is in here: btn_list = [TAG.button('Submit', _type='submit', _id='submit_btn'), TAG. button('Clear Form', _type='reset', _onclick='return confirm("Are you sure you want to clear the form?");', _id='clear_btn')] with my SQLFORM.factory buttons=btn_list
-- 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/groups/opt_out.