Skip to content

FormData doesn't collect the submitted button value #3060

@Vonfry

Description

@Vonfry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions