Thank you Anthony.

_readonly="readonly" solved my problem.



On Mon, Nov 7, 2011 at 10:52 AM, Anthony <abasta...@gmail.com> wrote:
> Have you tried INPUT(..., _readonly="readonly")? That adds an HTML
> "readonly" attribute to the INPUT field, so the readonly display is
> controlled by the browser (it should appear as a regular input field, but
> the value will not be editable). If you just want to display the value
> itself, but not in an input field, then don't use INPUT() at all -- just
> display the value inside the table cell.
> Anthony
>
> On Monday, November 7, 2011 7:33:00 AM UTC-5, viniciusban wrote:
>>
>> Hi guys.
>>
>> I have this construction:
>>
>>     form = SQLFORM(db.my_table,
>>         fields=[
>>             'description',
>>             'date'],
>>         submit_button='Add data')
>>
>>     my_person_data = TR(LABEL('Customer'),
>> INPUT(value=other_table.customer_id.name, name='customer_name'))
>>     form[0].insert(0, my_person_data)
>>
>> How can I make the new added field (aka, customer_name) readonly?
>> I tried to set a writable=False parameter in INPUT, but it didn't worked.
>>
>> --
>> Vinicius Assef.
>

Reply via email to