diff --git a/examples/form.rs b/examples/form.rs index 4fa87c885..5f0c992f5 100644 --- a/examples/form.rs +++ b/examples/form.rs @@ -14,10 +14,12 @@ fn app(cx: Scope) -> Element { div { h1 { "Form" } form { - oninput: move |ev| println!("{:?}", ev.values), + onsubmit: move |ev| println!("Submitted {:?}", ev.values), + oninput: move |ev| println!("Input {:?}", ev.values), input { r#type: "text", name: "username" } input { r#type: "text", name: "full-name" } input { r#type: "password", name: "password" } + button { "Submit the form" } } } })