BETAThis is a new service – your feedback will help us to improve it.

Saving form data

Now we're collecting form data on our server, the final step is to save it in our database.

When our form is submitted, we need to use Mongoose to create a new document, filled with data from the form, and save it to the right collection in the database.

Whenever we're interacting with the database, we need to include the right model.

Let's say we handle form submissions

Lessons last updated 12th July 2019. You can improve this lesson on Github.
Part of Databases
  1. Introducing databases
  2. Organising a databaseP
  3. Using a database driverP
  4. Creating modelsP
  5. Making forms workP
  6. Collecting form dataP
  7. Saving form dataP