-1

I am looking at making a simple survey for my clients, I have the base code, I just need to be able to log the user's input to a txt file! I want 1 answer per line per form (like User 1 has to lines of answers then 2 spaces then user 2 repeats) I am using an online IDE (repl.it) and the current form works but it does not save the data

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Form validation example</title>
  <style>
    input{display:block; margin-bottom:10px;}
  </style>
</head>

<body>
  <h1>######</h1>
  <h2>#####</h2>

  <form action="validation_example.html" method="post">
    <label for="first_name">#####</label>
    <input id="first_name" type="text" />
    
    <label for="last_name">###</label>
    <input id="last_name" type="text" />
    
    <input type="submit" value="Submit" />
  </form>
</body>
</html>```

1 Answers1

0

For saving the form input to a text file you will need a backend language which can form IO operations. Some of the popular examples are PHP, NodeJS, Python etc.

But if you don't want to go the backend way, there are other options but they might have security concerns around them.

Few of the examples are:

  1. Using Firebase for Saving Form Input (How do I make a Firebase Form?)
  2. Using Static Form Services (https://css-tricks.com/a-comparison-of-static-form-providers/)
Ashutosh Kumar
  • 459
  • 3
  • 12