After submitting the form, dropdown values are lost and other form errors occur #12676

Closed
opened 2026-02-21 19:08:29 -05:00 by yindo · 3 comments
Owner

Originally created by @AUSERGEE on GitHub (Apr 8, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image
Write the Jinja2 code for the form as shown in the image
Image
During preview testing, after completing and submitting the form, the form values are successfully captured in the response. However:

The selected value in dropdown menus (select elements) gets automatically cleared (date fields are also being reset)
The form displays an error message "Unsupported tag: br", despite there being no
tags in the actual Jinja2 template code.
Image

✔️ Expected Behavior

Dropdown selections should remain after form submit
Invalid tag errors should not occur (false positive)"

Actual Behavior

The selected value in dropdown menus (select elements) gets automatically cleared (date fields are also being reset)
The form displays an error message "Unsupported tag: br", despite there being no

Originally created by @AUSERGEE on GitHub (Apr 8, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/352eb431-5918-4ba5-974b-e7ea368d14cb) Write the Jinja2 code for the form as shown in the image ![Image](https://github.com/user-attachments/assets/6be1c56d-7e8a-4a66-8679-f6dac877319c) During preview testing, after completing and submitting the form, the form values are successfully captured in the response. However: The selected value in dropdown menus (select elements) gets automatically cleared (date fields are also being reset) The form displays an error message "Unsupported tag: br", despite there being no tags in the actual Jinja2 template code. ![Image](https://github.com/user-attachments/assets/ef8cdc37-42c6-444f-b8c5-5c4146561cee) ### ✔️ Expected Behavior Dropdown selections should remain after form submit Invalid tag errors should not occur (false positive)" ### ❌ Actual Behavior The selected value in dropdown menus (select elements) gets automatically cleared (date fields are also being reset) The form displays an error message "Unsupported tag: br", despite there being no
yindo added the 🐞 bug label 2026-02-21 19:08:29 -05:00
yindo closed this issue 2026-02-21 19:08:29 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 8, 2025):

你好 @AUSERGEE!我是一个助手,专门帮助你解决bug、回答问题,并成为项目的贡献者。很高兴能在这里帮助你,等待人类维护者的回复!

The issue you're experiencing with dropdown values being lost after form submission and the "Unsupported tag: br" error message can be attributed to known limitations in Dify.

  1. Dropdown Values Reset: Dify currently does not support select elements within form tags, which results in the dropdown values being cleared upon form submission. This is a known limitation, and there is no official solution for implementing select dropdowns in Dify forms at this time [1][2].

  2. Unsupported Tag Error: The "Unsupported tag: br" error message can occur due to a mismatch between opening and closing tags in the HTML rendering process. This issue is specific to Dify's implementation, even if the <br> tag is not present in your Jinja2 template [3].

To address these issues, you may need to consider alternative approaches for handling dropdowns and review the HTML rendering logic to ensure compatibility with Dify's current capabilities.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 8, 2025): <!-- Greeting --> 你好 @AUSERGEE!我是一个助手,专门帮助你解决bug、回答问题,并成为项目的贡献者。很高兴能在这里帮助你,等待人类维护者的回复! <!-- Answer --> The issue you're experiencing with dropdown values being lost after form submission and the "Unsupported tag: br" error message can be attributed to known limitations in Dify. 1. **Dropdown Values Reset**: Dify currently does not support select elements within form tags, which results in the dropdown values being cleared upon form submission. This is a known limitation, and there is no official solution for implementing select dropdowns in Dify forms at this time <sup>[[1]](https://github.com/langgenius/dify/issues/14516)</sup><sup>[[2]](https://github.com/langgenius/dify/issues/14487)</sup>. 2. **Unsupported Tag Error**: The "Unsupported tag: br" error message can occur due to a mismatch between opening and closing tags in the HTML rendering process. This issue is specific to Dify's implementation, even if the `<br>` tag is not present in your Jinja2 template <sup>[[3]](https://github.com/langgenius/dify/issues/13481)</sup>. To address these issues, you may need to consider alternative approaches for handling dropdowns and review the HTML rendering logic to ensure compatibility with Dify's current capabilities. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8869b20f-a14f-4fbf-adc0-6b6f7e96bac6?feedback_type=other)</sup>
Author
Owner

@imhdone commented on GitHub (Apr 10, 2025):

I made the 'Name' field mandatory when submitting the first message, but after the AI responded, my name was automatically removed from dropdown
@dosu.

@imhdone commented on GitHub (Apr 10, 2025): I made the 'Name' field mandatory when submitting the first message, but after the AI responded, my name was automatically removed from dropdown @dosu.
Author
Owner

@alienwaredream commented on GitHub (Apr 11, 2025):

I made the 'Name' field mandatory when submitting the first message, but after the AI responded, my name was automatically removed from dropdown我提交第一条消息时将“名称”字段设置为必填,但 AI 回复后,我的名字自动从下拉菜单中移除 @dosu.

The same bug.

@alienwaredream commented on GitHub (Apr 11, 2025): > I made the 'Name' field mandatory when submitting the first message, but after the AI responded, my name was automatically removed from dropdown我提交第一条消息时将“名称”字段设置为必填,但 AI 回复后,我的名字自动从下拉菜单中移除 [@dosu](https://github.com/dosu). The same bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12676