before the form=... try

db.oppty_main.origin_account_id.writable=False

you may also want to add:

db.oppty_main.origin_account_id.readable=False

On Dec 30, 8:39 am, Miguel Lopes <mig.e.lo...@gmail.com> wrote:
> I have a field with the following requirements:
>
> Field('origin_account_id', db.account),
> db.oppty_main.origin_account_id.requires=IS_IN_DB(db, 'account.id', 
> '%(name)s')
>
> In the controller:
> form=SQLFORM(db.oppty_main, record=oppty_main, deletable=True,
>                  fields=['name','origin_account_id','status'])
>
> And it's rendered with:
> {{=form}}
>
> My goal is to render the field as a Label or Disable the Select (so
> that the user cannot change the selection).
> In this particular case I might get away with coding if the value is
> in db, but I rather keep the requirement where it should be. Also, I'm
> pretty sure there's a way to accomplish this in web2py, so I would
> hate not doing it right!!! :-)
>
> Txs,
> Miguel

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to