DioxusLabs / DioxusLabs/dioxus
FormData doesn't collect the submitted button value
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
**Problem**
The formdata passed by onsubmit doesn't include the submitted button.
**Steps To Reproduce**
Steps to reproduce the behavior:
```
rsx! {
form {
onsubmit: |event| dioxus_logger::tracing::debug!(?event),
button { name: "btn_test", r#type: "submit", value: "submit", "Submit" }
}
}
```
**Expected behavior**
According to this [MDN doc](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value), the submitted button value should be included in the form data.
**Screenshots**
**Environment:**
- Dioxus version: `0.5.1`
- Rust version: `rustc 1.83.0-nightly (f79a912d9 2024-09-18)`
- OS info:
- App platform: web
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.