It will always be allowed to take a value in insert, a value that you 
assign it to, for example, via "default", like so:
db.table.field.default = some_value

To make the field non-editable to the end user, use:
db.table.field.editable = False
...
form = SQLFORM(db.table)

for the above examples, replace *table* with *your table name* and *field* 
with *your field name*.

You can find out the details in Chapter in 06 The database abstraction layer 
<http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer>
 and 07 Forms and validators 
<http://web2py.com/books/default/chapter/29/07/forms-and-validators>


On Friday, December 9, 2016 at 11:38:55 PM UTC+8, Amit Kumar Modak wrote:
>
> Hello,
>
> How can I make a field non-editable in SQLFORM, while it should be allowed 
> to take a value in insert.
>
>
> Regards,
> Amit
>

-- 
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.

Reply via email to