Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 10: Utilizing Forms with JavaScript!

Instruction

Building a FormData Object Manually

You can populate a FormData object by calling the object's append() method for each field you want to add, passing in the field's name and value. The value can be a string, for text fields, or a Blob, for binary fields, including File objects.

In the following example, we send data as a form submission when the user clicks a button:

async function sendData(data) {
  // Construct a...