[Zope3-Users] How to make a field not modifiable ?

Simon Elbaz elbazsimon9 at gmail.com
Tue May 25 17:44:42 EDT 2010


Hi,
I use the following interface:

class ILettrage(IRecord):
    record_to_write = zope.schema.List(
        title= u'Record to write',
        description = u'Records written',
        required=False,
        value_type = zope.schema.Object(schema=IRecordLettree)
    )

This interface is used in a z3c.form:

class LettrageEditForm(form.EditForm):
    form.extends(form.EditForm)
    fields = field.Fields(ilettrage.ILettrage).select('t_record_ref',
'record_to_write')

    def updateWidgets(self):
        super(LettrageEditForm, self).updateWidgets()
        self.widgets['t_record_ref'].mode = DISPLAY_MODE
self.widgets['invoice_to_write'].widgets[0].subform.widgets['t_invoice_ref'].mode
= DISPLAY_MODE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20100525/a5e27261/attachment.html 


More information about the Zope3-users mailing list