r/HTML • u/Wild-Blueberry2068 • Oct 22 '26
Input on website, survey-like
Hi! I'm new to coding on html
I want to make a box on my website where people submit requests, song names, etc, basically just text.
How do I do that? Where does the information go? As I want it to be private
Example:
[Tell me ur favorite color.]
( ______ )
[send]
Ideally I would have a document where all the responses go to or something else but I don't know what it's called. Thanks :-)
0
Upvotes
6
u/Awarnae Oct 22 '26
Just send post-request from form to backend
3
u/frownonline Oct 22 '26
You’re after a HTML form with a text input or textarea field. HTML isn’t enough for this alone, so you’ll need JavaScript or PHP for this.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form
3
u/Dragenby Oct 23 '26
You'll need to learn backend. PHP is the most accessible option.
1
u/testingaurora Oct 22 '26
You need a <form>. You could create a webhook thay connects to Google Sheets via AppsSheet so the form submissions are automated to write to the sheet. Its like a pseudo database , very simple to set up
1
u/rmunky1 Oct 22 '26
Email would be the easiest otherwise you would have to have php
1
u/DasBeasto Oct 23 '26
Instead of building your own server/backend like others are saying you can just use a service like Formspree, Getform, etc. (there’s a bunch) that is super easy to set up and have decent free tiers. Then any form submission your user send go to yoor dashboard and get emailed to you.
1
u/Flashy-Guava9952 Oct 23 '26
Have you tried Google Forms?
1
u/Menelabs Oct 23 '26
HTML on its own can't store anything. A
<form>just sends whatever was typed to the address in itsaction, and something at that address has to receive it and keep it. That something is called a "form backend". You can write one yourself (PHP, a small server), or use a service that does it for you, which is the easier route if your site is just HTML files.Disclosure: I build one of those services, BootForm, so keep that in mind. With it, your box would look like this:
Replace YOUR-ID with a UUID you generate yourself (any UUID generator works). Keep the hidden honeypot input and leave it empty, it's the spam trap: a lot of simple bots fill it in, people never see it. Send yourself a test and it takes you to a page where you make an account and claim the form. From then on the answers are private to you, in a dashboard, and they get emailed to you too. The free plan covers 250 answers a month, no card.
If you don't mind it looking like Google, Google Forms is also a perfectly good answer: you can embed it in your page and every answer lands in a Google Sheet, which sounds a lot like the "document" you're describing.
1
u/Hour-Breadfruit-2295 1d ago edited 1d ago
<form> <fieldset> <legend> Example: Email </legend> <input type="email" /> </fieldset> <fieldset> <legend> Example: Tell me a joke </legend> <input type="text" /> </fieldset> <input type="submit"> </form> Basic, very basic form submitter.