Skip to main content
⚠️ Only workflow forms support the Word template component. Each workflow form supports up to 5 Word template components.

Component Attributes

Usage Notes

The Word template component is a YiDA feature that generates Word attachments from a Word template and form field values. It is suitable for scenarios that require a standardized format, such as nationwide official document management. Usage notes:
  • Content in the Word template can be bound to form variables. Set the content in the template to the unique identifier of a form component, using the variable format ${component unique identifier}.
  • Supported in the YiDA data management page (display, export), associated forms (display, filter), form detail change records, workflow design (step submission rules, field permission settings), and print records.
  • In the workflow design, you can control the permissions (Editable, Read-only, Hidden) of the Word template component at each step.
  • Currently supported only in workflow forms.
  • Getting and setting values through JS APIs is not supported.
  • Viewing the Word template data format through Open APIs is not supported.
The default print template configuration is as follows: The print result is as follows:

Example

Follow these steps to work with the Word template component.

Step 1: Create a Workflow Form

1

Sign in to the YiDA console and create a blank app

2

Click Create workflow form to create a workflow form

3

Drag a Single-line text component and a Word template component into the form

4

Select the Single-line text component, click Premium in the attributes panel on the right, and copy the unique identifier of the Single-line text component

Step 2: Create a Word Template

  1. Create a Word document (.docx) locally and open it.
  2. Add the unique identifier of the Single-line text component copied in Step 1 to the Word document, using the format ${Single-line text component unique identifier}.
  3. Save the file.

Step 3: Use the Template in a Workflow

  1. Return to the form design page in the YiDA console.
  2. Select the Word template component. In the attribute panel on the right, click Select Word template and upload the Word document created in the previous step.
1

Click Preview in the upper-right corner, then click Visit this page

2

Enter content in the Single-line text field, then click Submit. After submission succeeds, preview the content of the Word document on the approval page

As shown below, the ${} placeholders in the Word template are replaced with the actual form values.

Considerations

  • When a form contains a subform, ${placeholder} references to single-line text, multi-line text, number, select, dropdown select, multiselect, dropdown multiselect, date, and image upload components inside the subform cannot be rendered in the Word template component. Printing content that references the Word template component from within a subform is also not supported.
  • If the app has dedicated OSS storage enabled for file-storage components such as images and attachments, references from the Word template are not supported.
  • To use image-type variables in the Word template, the component identifier must start with a specific variable prefix.
  • For example: attachmentField_kdtv9ayf, imageField_kdtv9aye, digitalSignatureField_kdtv9aye.