[Zope3-Users] Re: INameChooser + accessing schema field

jürgen Kartnaller j.kartnaller at cable.vol.at
Tue Feb 8 16:20:36 EST 2005


Ruslan Spivak wrote:
> Hi.
> 
> For my Blog container i implemented INameChooser adapter to be able to
> customize names of blog entries, but in chooseName(name, blogentry)
> method when i access schema fields of 'blogentry' they have default
> values and not those that are entered in add form. The point is i'd like
> to create name containing words from 'title' field of blog entry, but
> it's empty for that moment. 
> Is there any mean to get to schema field value entered in add form
> inside chooseName method?

You need to define the fields needed with set_before_add in your addForm 
directive.
These fields are set before your name chooser is called.

Jürgen



More information about the Zope3-users mailing list