I finished the HTML course today, but am trying to brush up on concepts in my own local html file. I can recreate things like tables and lists, but the inner workings of forms still perplex me. What I’d most like to know is what to make the value of the action attribute within the element when you have no intended place to POST or GET information from.
What would I need to do to test the functionality of form and submit input?
How do I retrieve information from a submited form?
And how do I display a confirmation page once a user submits the form?
Without using a server, you might use JavaScript to get the data from a form and make it (or something related) show up on the same webpage.
For most other stuff, you’d need a server [or something that acts like one], and a program that runs on that server.
Ah, I was suspecting JavaScript might be involved. I’ll probably have to learn JavaScript after I get the basics of HTML and CSS pinned down. I’m sure there are some servers you can use to host test websites, I’ll have to do some research. For now I’ll just wait until I start messing around with forms.
In regard to what happens after you submit a form, here’s a nice diagram I found while searching for the same thing:
To answer your question…if there’s no indented place you’re sending the information, it simply creates an empty POST/GET. This is covered more in depth when you learn backend.