feat: form works in web

This commit is contained in:
Jonathan Kelley committed 2022-02-04 02:13:35 -05:00
1 parent add21d5f9d
commit d758dc6065
2 files changed
+31 -25

No files matched your search

+4 -3
View File
@@ -1,6 +1,7 @@
//! Example: README.md showcase
//! Forms
//!
//! The example from the README.md.
//! Dioxus forms deviate slightly from html, automatically returning all named inputs
//! in the "values" field
use dioxus::prelude::*;
@@ -13,7 +14,7 @@ fn app(cx: Scope) -> Element {
div {
h1 { "Form" }
form {
oninput: move |ev| println!("{:?}", ev),
oninput: move |ev| println!("{:?}", ev.values),
input { r#type: "text", name: "username" }
input { r#type: "text", name: "full-name" }
input { r#type: "password", name: "password" }