>
> I am talking about the second bullet in 
> http://web2py.com/books/default/chapter/29/6#Record-representation.
>
>    - To set the db.othertable.person.represent attribute for all fields 
>    referencing this table. This means that SQLTABLE will not show references 
>    by id but will use the format preferred representation instead.
>
> This talks about SQLTABLE, which works alright. However, when I open a 
> record in an SQLFORM, it doesn't use the format preferred representation.
>

Are you talking about a read-only form or an update form? On an update 
form, it cannot use the alternative representation because the user must 
enter the actual field value, not merely a transformed representation of it 
(web2py has no general way of converting back from representations to 
original values, and it isn't even guaranteed that each unique 
representation has a unique original value). The one exception is with 
select widgets, which can display alternate representations, but that has 
to be set using the IS_IN_SET or IS_IN_DB validators.

Anthony 

Reply via email to