문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top