Gunnar Bittersmann: HTML-Formular nur bei Klick auf button abschicken

Beitrag lesen

@@Felix Riesterer

🤔 Was mach ich falsch?

Du hast kein Text-Input.

Ach, daher weht der Wind.

Implicit submission: “on some platforms hitting the "enter" key while a text control is focused implicitly submits the form”

Ergänze eines und das Formular wird versandt.

Aber auch nur eines, nicht zwei.

“If the form has no submit button, then the implicit submission mechanism must do nothing if the form has more than one field that blocks implicit submission, and must submit the form element from the form element itself otherwise.”

Implicit submission ist damit für Formulare mit genau einem (Text-)Eingabefeld geeignet, bei dem Nutzern klar ist, dass die Eingabe mit [Enter] abgeschlossen werden kann und es deshalb nicht unbedingt eines Submit-Buttons bedarf. Halt sowas wie ein Such-Eingabefeld.

LLAP 🖖

--
Wenn der Faschismus wiederkommt, wird er nicht sagen: Hallo, ich bin der Faschismus! Sondern er wird sagen: Ich nehme die Wahl an.