Fix #2043: use formvalue instead of String for forms
This commit is contained in:
1 parent
468d2b6b3b
commit
2dc6cecf2e
11 files changed
+100
-37
No files matched your search
+22
-1
@@ -60,8 +60,9 @@ fn app() -> Element {
|
||||
|
||||
label { r#for: "full-name", "Full Name" }
|
||||
input { r#type: "text", name: "full-name" }
|
||||
input { r#type: "text", name: "full-name" }
|
||||
|
||||
label { r#for: "email", "Email" }
|
||||
label { r#for: "email", "Email (matching <name>@example.com)" }
|
||||
input { r#type: "email", pattern: ".+@example\\.com", size: "30", required: "true", id: "email", name: "email" }
|
||||
|
||||
label { r#for: "password", "Password" }
|
||||
@@ -102,6 +103,26 @@ fn app() -> Element {
|
||||
id: "start"
|
||||
}
|
||||
|
||||
// CHekcboxes
|
||||
label { r#for: "cbox", "Color" }
|
||||
div {
|
||||
label { r#for: "cbox-red", "red" }
|
||||
input { r#type: "checkbox", checked: true, name: "cbox", value: "red", id: "cbox-red" }
|
||||
}
|
||||
div {
|
||||
label { r#for: "cbox-blue", "blue" }
|
||||
input { r#type: "checkbox", name: "cbox", value: "blue", id: "cbox-blue" }
|
||||
}
|
||||
div {
|
||||
label { r#for: "cbox-green", "green" }
|
||||
input { r#type: "checkbox", name: "cbox", value: "green", id: "cbox-green" }
|
||||
}
|
||||
div {
|
||||
label { r#for: "cbox-yellow", "yellow" }
|
||||
input { r#type: "checkbox", name: "cbox", value: "yellow", id: "cbox-yellow" }
|
||||
}
|
||||
|
||||
|
||||
// Buttons will submit your form by default.
|
||||
button { r#type: "submit", value: "Submit", "Submit the form" }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user