如何在[alfresco]表单控件中设置hide/show
How to hide/show sets in [alfresco] form control
我想知道如何在它的字段为空时隐藏它 'set' 并在它的字段有任何值时显示它。
<config evaluator="task-type" condition="vorwf:allocateDocumentProperties" replace="true">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="bpm:workflowDescription"/>
<show id="packageItems" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="information" appearance="title" label="Workflow Information" />
<set id="wfinfo" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignees" appearance="title" label="Assignees" template="/org/alfresco/components/form/3-column-set.ftl" />
<set id="items" appearance="title" label="Workflow Documents" />
<field id="bpm:workflowDueDate" label="Due Date" set="wfinfo" read-only="true">
<control template="/org/alfresco/components/form/controls/date.ftl">
<control-param name="showTime">false</control-param>
<control-param name="submitTime">false</control-param>
</control>
</field>
<field id="bpm:workflowPriority" label="Priority" set="wfinfo" read-only="true">
<control template="controls/workflow/priority.ftl" />
</field>
<field id="transitions" set="outcome" />
</appearance>
</form>
</forms>
</config>
如果有人有任何想法请告诉我!
您可以借助 view-form/edit-form 并使用自定义模板。
https://docs.alfresco.com/5.2/references/forms-reference.html
此处给出了自定义编辑表单模板的示例:
https://docs.alfresco.com/5.2/tasks/forms-custom-formtemplate.html
我想知道如何在它的字段为空时隐藏它 'set' 并在它的字段有任何值时显示它。
<config evaluator="task-type" condition="vorwf:allocateDocumentProperties" replace="true">
<forms>
<form id="workflow-details">
<field-visibility>
<show id="bpm:workflowDescription"/>
<show id="packageItems" />
<show id="bpm:comment" />
<show id="transitions" />
</field-visibility>
<appearance>
<set id="information" appearance="title" label="Workflow Information" />
<set id="wfinfo" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignees" appearance="title" label="Assignees" template="/org/alfresco/components/form/3-column-set.ftl" />
<set id="items" appearance="title" label="Workflow Documents" />
<field id="bpm:workflowDueDate" label="Due Date" set="wfinfo" read-only="true">
<control template="/org/alfresco/components/form/controls/date.ftl">
<control-param name="showTime">false</control-param>
<control-param name="submitTime">false</control-param>
</control>
</field>
<field id="bpm:workflowPriority" label="Priority" set="wfinfo" read-only="true">
<control template="controls/workflow/priority.ftl" />
</field>
<field id="transitions" set="outcome" />
</appearance>
</form>
</forms>
</config>
如果有人有任何想法请告诉我!
您可以借助 view-form/edit-form 并使用自定义模板。 https://docs.alfresco.com/5.2/references/forms-reference.html
此处给出了自定义编辑表单模板的示例: https://docs.alfresco.com/5.2/tasks/forms-custom-formtemplate.html