On Monday, March 19, 2018 at 10:30:04 PM UTC-7, Dave S wrote:
>
>
>
> On Monday, March 19, 2018 at 7:13:28 PM UTC-7, F.C. wrote:
>>
>> I use a custom form within my application to capture comments for 
>> specific records. The user clicks on a record and is directed to another 
>> view where they can capture the comments.
>>
>> Is it possible to define a custom value for a specific custom form field, 
>> and then hide that field so that the user does not see it. The reason I 
>> need to do that is that I want to save the comment to the associated record 
>> against whom the comments should be recorded.
>>
>> I hope this provides enough guidance on what I am looking for.
>>
>>
> I think there's help in the book:
>
>
>>    - writable declares whether a field is writable in forms.
>>    - readable declares whether a field is readable in forms. If a field 
>>    is neither readable nor writable, it will not be displayed in create and 
>>    update forms.
>>
>> found at
> <URL:
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor
> >
>
> (warning: the online copy of the book still refers to "CRUD" as new; it is 
> now deprecated)
>
> Another reference that might be useful is
> <URL:
> http://web2py.com/books/default/chapter/29/07/forms-and-validators#Conditional-fields
> >
>  
>

Also, you can turn the readable and writable setting on or off on the fly:

<URL:http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Run-time-field-and-table-modification>

/dps
 

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