Retrieving standard behavior field

Hello,

I defined a custom content type including some standard behaviors:

<property name="behaviors">
   <element value="plone.app.dexterity.behaviors.id.IShortName"/>
   <element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
   <element value="plone.app.dexterity.behaviors.discussion.IAllowDiscussion"/>
</property>

In my custom edit form now I need to hide some fields, like this:

class EditForm(DefaultEditForm):

    ''' Custom edit form

    '''


    def updateWidgets(self):

        super(EditForm, self).updateWidgets()

        self.widgets['IDublinCore.title'].mode = 'hidden'

The problem is that inside the updateWidgets function self.widgets contains just the “IDublinCore.title” and "IDublinCore.description" keys. I need to hide the "IShortName.id" field, if some conditions are satisfied. How can I retrieve it?

Thanks

Is it possible that the behavior you add (IShortName) is actually the ability to edit 'short name'.

If that is the case, just remove it

<property name="behaviors">
   <element value="plone.app.dexterity.behaviors.metadata.IDublinCore"/>
   <element value="plone.app.dexterity.behaviors.discussion.IAllowDiscussion"/>
</property>

Yes,

I need to hide that field but only if some condition occur. So I cannot just remove it.

Thanks