Forms aren't working

Yes, I would hope so.

But with some of the HTML5 things I’ve seen it let through I have some doubt.

Anyway, @Scully, It is possible to do a “JavaScript-only looks like a form but isn’t” thing using buttons and gerElementBys but please don’t

Currently, the code has input tags that are not inside any form tags.
Thus, the form will not work.

As a simplified bare-minimum example it should be something like

<form action="where-the-values-are-sent-to" method="most-likely-post">
<input type="text" name="whatever">
<input type="submit" value="Submit">
</form>

The where-the-values-are-sent-to file can then use the POST HTTP header array, which contains key-value pairs of named inputs eg. POST['whatever'] => "whatever was in the input field"

Here’s a few MDN articles. If you don’t understand something in them, please ask.

HTML forms guide
Sending form data
Forms in HTML
My first HTML form

2 Likes