FORM-003: form has no button
Warning: the page still builds, but this is most likely a mistake.
Without a button, a form can be sent only by pressing Enter in a field, which few people know and which doesn't work in every form. AI agents look for the button too.
Fails
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
form("/newsletter", name: "newsletter") {
field("email", type: Email, label: "Email")
}
}warning[FORM-003]: form has no button to submit it
--> page.hypra:3:3
|
3 | form("/newsletter", name: "newsletter") {
| ^^^^
= help: add button "Send"
= docs: https://hypralang.dev/rules/form-003/
0 errors, 1 warningFixed
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
form("/newsletter", name: "newsletter") {
field("email", type: Email, label: "Email")
button "Subscribe"
}
}