Hi,<br>I am working through the chapter 5 source code from the Grok development book and I get an Attribute error. <br><br>id = str(self.next_id)<br>AttributeError: &#39;Project&#39; object has no attribute &#39;next_id&#39;<br>
<br>Which seems to be caused by this line: <br><br>form_fields = grok.AutoFields(Project).omit(&#39;next_id&#39;)<br><br>Because the field is omitted from the form.<br>It is in the interface definition.<br><br>How can I omit a field from the form and still see it in the methods?<br>
The code I am using is unaltered from the book.  <br>This is the add project code:<br><br>class AddProjectForm(grok.AddForm):<br>    grok.context(Todo)<br>    <a href="http://grok.name">grok.name</a>(&#39;index&#39;)<br>    form_fields = grok.AutoFields(Project).omit(&#39;next_id&#39;)<br>
<br>    label = &quot;To begin, add a new project&quot;<br>    template = grok.PageTemplateFile(&#39;<a href="http://custom_edit_form.pt">custom_edit_form.pt</a>&#39;)<br><br>    @grok.action(&#39;Add project&#39;)<br>    def add(self,**data):<br>
        project = Project()<br>        self.applyData(project,**data)<br>        id = str(self.context.next_id)<br>        self.context.next_id = self.context.next_id+1<br>        self.context[id] = project<br>        return self.redirect(self.url(self.context[id]))<br>
<br>Thanks<br>