By default, non-writable fields are excluded from create forms (though shown in edit forms if readable=True). However, you can override that behavior by specifying the "fields" argument with a list of field names to include in the form.
Anthony On Friday, March 29, 2019 at 4:32:27 PM UTC-4, João Matos wrote: > > Tried that, doesn't work. > With writable=False the field isn't shown. > > > sexta-feira, 29 de Março de 2019 às 20:12:45 UTC, Jim S escreveu: >> >> Set writable=False >> >> Field('end', 'date', requires=IS_DATE('%m/%d/%Y'), default=default_end, >> writable=False) >> >> -Jim >> >> On Friday, March 29, 2019 at 2:39:58 PM UTC-5, João Matos wrote: >>> >>> Hello, >>> >>> How can I add a read-only field to a SQLFORM.factory? >>> >>> Thanks, >>> >>> JM >>> >>> -- 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/d/optout.