Question

I am using a content type which uses IBasic behavior (title + description). I'd like to hide description field on add and edit forms.

I am familiar how to do with Archetypes, but couldn't find a good way to do with Dexterity after trial-end-error - I think IBasic behavior also provides some rename-after-creation etc. logic which is also needed for my use case.

Was it helpful?

Solution

If you want to hide the description field, you should not use IBasic (nor IDublinCore, as that is IBasic plus a few more).

You can define your own behavior with a title field (and possibly still a description field that you hide in the normal way with form.omitted('description') if you only want to hide it instead of complete removing it).

For the rename-after-creation part: this is the plone.app.content.interfaces.INameFromTitle behavior. It only needs a title field, so an own behavior with just a title field would be enough. Some more hints for this part are here: http://davidjb.com/blog/2010/04/plone-and-dexterity-working-with-computed-fields

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top