Help creating a survey form

I’m making a website for a school project where people can share coming out stories. I am new to website building please forgive my stupid questions. I’m having trouble creating the form that users can fill out. I’m also confused about how to access the forms once they have been submitted. I am coding in HTML. Any help or pointers to where I can find more information would be helpful. Thank you in advance.

You should use GetForm if you want to do it the wrong way, with ajax, or use node.js which is the right way to go about stuff and you can be very flexible.

Also you can’t code in HTML. You can MarkUp with HTML, but yeah…

You could make a post request (using js) with the results of the form to Discord (or a similar service).

Hi Evan!

Don’t worry about it, there are no stupid questions.

I will be totally honest. The easiest way to achieve what you want is to use a pre-built service like Google Forms. That way you can just focus on building the form and the results can be emailed to you or you can view them in a Google dashboard. Easy.

The second easiest way, if you want to write a little bit of HTML but not write a whole end-to-end Glitch application, is to use Netlify Forms. This is a completely different way of hosting a site, nothing to do with Glitch. You’d simply write an HTML page with your form and textarea for their story, then decorate the form with the netlify attribute. This means any time someone submits it, it would go into your Netlify dashboard and optionally be emailed to you.

Just sign up for Netlify (you can log in with GitHub if you already have that). There is an option to upload a site by dropping a zip file (you don’t need to know how to use git). So I’d make a website in a folder, where the index page has a form like this:

<form netlify>
<!-- Any data you want to gather. Maybe you want it to be anonymous? -->
<label>Your name:<input name="name"></label>

<!-- Gather their story in a textarea -->
<textarea name="story"></textarea>

<button type="submit">Submit</button>
</form>

You can make it fancy any way you want with CSS etc. Just make sure the inputs each have a name and the form has the netlify attribute.

Netlify will make your site live and you can go into the dashboard to change its name to something like our-stories.netlify.app or you can buy a custom domain for it.

Then you can choose what to do with the stories. Maybe paste them from your email onto a separate page and link to it from the survey?

You could build out a full Glitch app based off the hello-sqlite table but I think this is more than you need in this case. And retrieving the data would be more difficult.

You could use Glitch to prototype the form so that you can get rapid feedback on it, then make it live on Netlify.

I hope these options help! Have fun!

3 Likes

Stop gatekeeping HTML :stuck_out_tongue_winking_eye:

2 Likes

When I hear developers say this, it infuriates me. For anyone who comes across this in the future, you can code in HTML.

People who say you can’t code with HTML because there HTML is a basic programming language, no. Without HTML (basically the foundation of web design and almost every website), there would essentially be no web because JavaScript and CSS can’t save you if there was no HTML. In fact, it may not even exist, because in order to style HTML with CSS, you need HTML. In order to manipulate the DOM with JavaScript, you basically need HTML as the MDN docs state:

The Document Object Model (DOM) is a programming interface for HTML and XML documents.

So, without the DOM, there is basically no JavaScript and also, JavaScript was created for HTML:

JavaScript was born as a scripting language to validate input and it has traveled its journey of becoming a full-blown programming language that can be used to build anything from mobile apps, web applications to even desktop applications.

- https://hackernoon.com/how-javascript-was-created-and-why-the-history-behind-it-is-important-fwh3tco

So, yes, you can code in HTML.

4 Likes

2x like because this is so true.

3 Likes

Wow, thanks for the detailed answer. I will look into netlify.

3 Likes

Oh, and I forgot to mention, netlify forms has a 100 form limit for free plans, but if you have the GitHub student pack, you can use pageclip which has unlimited submissions.

Actually, CSS and HTML are MarkUp languages, so the short answer is that you don’t code with them, but with a longer answer you actually do.

1 Like