<br>Hi,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Sorry my previous mail was incomplete.</blockquote><div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I use the following interfaces:<br></blockquote><div><br>********************************************* <br>
</div><div>class IRecordLettree(zope.interface.Interface):<br><br></div><div>     t_sub_ref = zope.schema.TextLine(<br>    title=u&quot;Sub Ref.&quot;,<br>    required=True)<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
class ILettrage(zope.interface.Interface):<br>    record_to_write = zope.schema.List(<br>        title= u&#39;Record to write&#39;,<br>        description = u&#39;Records written&#39;,<br>        required=False,<br>
        value_type = zope.schema.Object(schema=IRecordLettree)<br>    )<br>******************************************<br>This interface is used in a z3c.form:<br><br>class LettrageEditForm(form.EditForm):<br>    form.extends(form.EditForm)<br>
    fields = field.Fields(ILettrage).select(&#39;t_record_ref&#39;, &#39;record_to_write&#39;)<br>
<br>    def updateWidgets(self):<br>        super(LettrageEditForm, self).updateWidgets()<br>        self.widgets[&#39;t_record_ref&#39;].mode = DISPLAY_MODE<br> self.widgets[&#39;record_to_write&#39;].widgets[0].subform.widgets[&#39;t_sub_ref&#39;].mode = DISPLAY_MODE<br>
</blockquote><div>**********************************************<br><br>When I click on the Apply button, I get the following error:<br><div class="status">
        <div class="summary">There were some errors.</div>
        <ul class="errors"><li>
            
              Record to write:
            
            
  <div class="error">Constraint not satisfied</div>


          </li></ul>
      </div>while t_sub_ref was previously filled.<br><br>The goal is to make some fields of the subobject not modifiable in the edit form (without using read-only attribute in the interface).<br><br>How could I achieve that?<br>
<br>Thanks for your help<br>Simon<br></div></div>