dioxus
dioxus copied to clipboard
FormData doesn't collect the submitted button value
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, 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