Js Survey/Form Help!

I’m trying to make a js form or survey whatever you want to call it with prompts but I don’t know how to take the data inputted by the person being surveyed onto some other document or something. Is there a specific js command to do this?
thx

Create a form using JS

You can use HTML to create the form using input ect… Prompts would be a bit annoying…

To put out the data you will need a backend language, maybe PHP and MySQL to store in database…

I found this on YouTube (I haven’t watched it)

1 Like

If you want to store the data, you are going to need a server side language. PHP and mysql is a good choice (there are more, but php will do nicely)

mysql is a database, see it like a table with rows of information. This is the easiest method to store data from a form (i would definitely use a form for this, not prompt), and fetch it if you want to display it on the webpage again.

using php also gives you the option to server side validate the form, this is much safer then clientside (js), and once in a database, you can always use php to fetch the data from a database, and store it in a text file for a client to download.

If you are going to do this (which is quit a challenge), use php to extract and validate the data from a form.

It seems there are library’s for js to store data in a file directly. See filesaver, in that case you can extract the data from the form with js

2 Likes