I want to create a form parser, to not break the compatibility with FORM
something like this:
raw_form = SQLFORM(db.table)
from plugin_html5form import HTML5FORM
html5_form = HTML5FORM(form)
So HTML5FORM receives a FORM object and loops inside its components
changing everything to html5 pattern
nothing generic, but i have been known to do things like:
#Set HTML 5 input properties
if not auth.is_logged_in():
form.custom.widget.first_name['_required'] = True
form.custom.widget.first_name['_autofocus'] = True
form.custom.widget.last_name['_required'] = True
2 matches
Mail list logo