From c4a0b91e1e2c1c5e727a5dcfb40555e407b035e5 Mon Sep 17 00:00:00 2001 From: RiskeyL <7a8y@163.com> Date: Tue, 19 May 2026 18:29:24 +0800 Subject: [PATCH] docs: fix template node interactive forms and add tag reference --- en/use-dify/nodes/template.mdx | 109 +++++++++++-- .../workflow/template-quick-reply-button.png | Bin 0 -> 66910 bytes ja/use-dify/nodes/template.mdx | 147 ++++++++++++------ zh/use-dify/nodes/template.mdx | 147 ++++++++++++------ 4 files changed, 295 insertions(+), 108 deletions(-) create mode 100644 images/use-dify/workflow/template-quick-reply-button.png diff --git a/en/use-dify/nodes/template.mdx b/en/use-dify/nodes/template.mdx index 2a2e91bd9..e450cf203 100644 --- a/en/use-dify/nodes/template.mdx +++ b/en/use-dify/nodes/template.mdx @@ -62,7 +62,7 @@ Jinja2 filters transform data during template rendering: {{ name | upper }} {{ price | round(2) }} {{ content | replace('\n', '
') }} -{{ timestamp | strftime('%B %d, %Y') }} +{{ tags | join(', ') }} {{ score | default('No score available') }} ``` @@ -77,30 +77,107 @@ Handle missing or invalid data gracefully using default values and conditional c ## Interactive Forms -Templates can generate interactive HTML forms for structured data collection in chat interfaces: +Templates can generate interactive HTML forms for structured data collection in Chatflows. + +On submit, the form values are sent to the chat as the end user's next message. The format depends on the `
`'s `data-format` attribute: + +- **`data-format="json"`**: values are serialized as a JSON object. A downstream Code node or Parameter Extractor can `JSON.parse` it (or pattern-match it) to pull out each field. +- **Unset (or any other value)**: values are sent as plain text, one `name: value` per line. Easier for an LLM to read. + +For example: + + + ```html - - - - - - - - - - + + + + + + + + + + + + + + + ``` - - ![Interactive Form Rendered in Chat Interface](https://assets-docs.dify.ai/2025/04/9d24e9cfa3cdde00e4eee15bd4bbea76.png) + + + + Interactive Form Rendered in Chat Interface + + +
+ +### Supported Tags + +|
Tag
| Attributes | Notes | +|:---|:---|:---| +| `
` | `data-format` | Container for form fields.



Set `data-format="json"` to receive submissions as JSON; any other value (or unset) sends plain text. | +| `