[web2py] Re: change represent of referenced filed in SQLFORM update

2017-08-06 Thread Vic Ding
works like a charm! On Sunday, August 6, 2017 at 4:39:07 PM UTC+2, Anthony wrote: > > On Saturday, August 5, 2017 at 4:12:43 PM UTC-4, Vic Ding wrote: >> >> Thanks for the help, it works. However, this alters the table definition. >> 1) Is there a way that the value is only set temporarily ? >>

[web2py] Re: change represent of referenced filed in SQLFORM update

2017-08-06 Thread Anthony
On Saturday, August 5, 2017 at 4:12:43 PM UTC-4, Vic Ding wrote: > > Thanks for the help, it works. However, this alters the table definition. > 1) Is there a way that the value is only set temporarily ? > You can set db.customer._format and db.sales_order.customer.requires anywhere you want.

[web2py] Re: change represent of referenced filed in SQLFORM update

2017-08-05 Thread Vic Ding
Thanks for the help, it works. However, this alters the table definition. 1) Is there a way that the value is only set temporarily ? 2) When the address field is empty, can I use other fields , like city, country and etc? On Saturday, August 5, 2017 at 9:10:25 PM UTC+2, Anthony wrote: > > The

[web2py] Re: change represent of referenced filed in SQLFORM update

2017-08-05 Thread Anthony
The "represent" attribute controls the display of read-only data in grids and read-only forms (or read-only fields). The values shown in the select element in a form are controlled by the validator, which defaults to IS_IN_DB for a reference field. The values shown in the select element