can you try this? form = Form(....) if not form.submitted: form.vars.update({field.name:field.default for field in form.table if field.default})
Maybe I can make this default behavior? On Tuesday, 21 January 2020 18:27:02 UTC-8, Jim S wrote: > > Sorry for all the py4web noob questions > > I have the following: > > search_text = 'test' > form = Form([Field('search', > length=50, > default=search_text)], > form_name='search_form', > formstyle=FormStyleBulma, > keep_values=True) > > I can't get the default search_text to appear in the field. > > Anything obvious I'm missing? > > -Jim > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/e9ea15c4-d6a4-44de-a13b-d54e2d0e606c%40googlegroups.com.