如何以简单的编辑元数据表单显示/隐藏字段
在 share-config-custom.xml 中,我定义了以下内容:
<config evaluator="node-type" condition="zk:document">
<forms>
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:description" force="true" />
<show id="zk:nummer" />
<show id="zk:registratieDatum" />
<show id="zk:zaakType" />
<show id="zk:documentType" />
<show id="zk:vertrouwelijkheid" />
<show id="zk:richting" />
<show id="zk:subject" />
<show id="zk:object" />
<show id="zk:perceel" />
<show id="cm:taggable" for-mode="edit" force="true" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>
表单在查看和编辑(完整元数据编辑)中显示良好,但在简单编辑模式下(在 docLibrary --> 编辑元数据)我也得到了许多领域。 我只想在简单模式下显示几个字段,在完整模式下显示完整堆栈。
我怎样才能实现这个目标?例如,简单模式下的 cm:content 仅包含名称、标题和内容。描述和完整模式下的完整堆栈。
重现这个非常简单: - 开始露天 - 添加内容 - 单击编辑元数据(在docLib中),您将看到一个简单的编辑表单 - 点击右上角,您将看到完整的编辑表格
我的问题: - 如何配置简单编辑表单?
谢谢!
In the share-config-custom.xml i've defined the following:
<config evaluator="node-type" condition="zk:document">
<forms>
<form>
<field-visibility>
<show id="cm:name" />
<show id="cm:description" force="true" />
<show id="zk:nummer" />
<show id="zk:registratieDatum" />
<show id="zk:zaakType" />
<show id="zk:documentType" />
<show id="zk:vertrouwelijkheid" />
<show id="zk:richting" />
<show id="zk:subject" />
<show id="zk:object" />
<show id="zk:perceel" />
<show id="cm:taggable" for-mode="edit" force="true" />
</field-visibility>
<appearance>
</appearance>
</form>
</forms>
</config>
The form shows fine in View and Edit(full metadata edit), but in simple edit mode (on docLibrary --> edit metadata) I'm getting too many fields.
I want only to show a couple of fields in simple mode and the full stack in full mode.
How can I achieve this? e.g. like the cm:content in simple mode only name, title & description and in Full mode the full stack.
Very simple to reproduce this:
- Start Alfresco
- Add a content
- click on edit-metadata (in docLib), you will see a simple edit form
- click on the upper-right corner, you will see a full edit form
My question:
- How can I configure the simple edit form?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下原始的共享表单配置: tomcat/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml
您可以看到简单的元数据对话框有一个单独的表单定义。除了您已经定义的正常表单之外,还可以使用 form id="doclib-simple-metadata" 来设置它。
Have a look at the original share form config: tomcat/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml
There you can see that the simple metadata dialog has a separate form definition. It can be set by using the form id="doclib-simple-metadata" in addition to the normal form that you already have defined.
你需要添加另一个formid(doclib-simple-metadata):
干杯,jan(@alfrescian)
you need to add another formid (doclib-simple-metadata):
Cheers, jan (@alfrescian)