I am conditionally displaying the form input in a view. Something like this:
{{if 'name' in form.fields:}} <dl> <dt>Name:</dt> <dd>{{=form.custom.widget.name}}</dd> </dl> {{pass}} I can change that to: {{if 'name' in form.custom.widget:}} ... {{pass}} On Sunday, August 12, 2018 at 9:36:06 PM UTC-4, Massimo Di Pierro wrote: > > On second look this is correct and intentional and fixed a bug. this form > is a from a factory and there is no record. the field is not writable > therefore it can only be displayed in read-only mode but there is no value > (record) to display. > > Does it break something? > > On Sunday, 12 August 2018 12:52:31 UTC-7, Jim Karsten wrote: >> >> I'm seeing a change in behaviour between versions 2.16.1 and 2.17.1. >> >> form = SQLFORM.factory(Field('name', writable=False)) >> print form.fields >> >> # In 2.16.1 prints: ['id', 'name'] >> # In 2.17.1 prints: ['id'] >> >> Is this intentional? >> >> -- 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.