Workflow Download field
The Download field is used to provide a button that allows users to download a document within a workflow form.
| Attribute | Description | Required |
|---|---|---|
| label |
The text shown as a label in the user interface. |
true |
| name |
Unique name identifier Two fields cannot have the same name in the same task definition. The name must be unique. |
true |
| width |
The width of the HTML element. In the case of KCenter UI, you must use width values based on %, for example:
|
false |
| data |
When present, it is an identifier used to load data. For example, to dynamically load the uuid or path of the node to download. |
false |
| visible |
This attribute only makes sense when used in conjunction with an object mapped in the data attribute; the visible value of the object mapped in data is assigned to the form field, causing it to be shown or hidden (the most common use is to hide it). The default value of visible is true. |
false |
|
Child elements:
|
||
Basic download example
- Download button with a static node element.
- The uuid must be a valid document UUID.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN" "http://www.openkm.com/dtd/workflow-forms-2.6.dtd"> <workflow-forms> <workflow-form task="download test"> <download name="download" label="Download document"> <node label="download" uuid="afb8ac33-912d-4515-e29b-1c01b693809a" /> </download> </workflow-form> </workflow-forms>
Dynamic download example
- The data attribute is a mapping variable used to dynamically set the UUID on the node element at runtime.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN"
"http://www.openkm.com/dtd/workflow-forms-2.6.dtd">
<workflow-forms>
<workflow-form task="download test">
<download name="download" label="Download document" data="dynamic">
<node label="download"/>
</download>
</workflow-form>
</workflow-forms>