Exercise 8

The goal of this exercise is to create a contact form.

Due Date and Time

Exercise 8 is due by 5:59pm on April 4th, 2019. I will disable submission at the start of class.

Instructions

Setup

  1. Download the exercise files from the Box Folder named CS0134-E8-<username> that I shared with you.
  2. Unzip and copy the ‘CS0134-E8-<username>’ folder onto your flash drive.
  3. Open contact.html in Notepad++.

Goals

Each goal is worth 1 point unless otherwise marked. Total of 10 points.

  • Create a form element with the action attribute set to “mailto:<your email address>”, the method attribute set to “post” and the enctype attribute set to “text/plain” (2pts)
  • Inside the form element add the following
    • An input element of type email with the id and name attributes set to “from” and a maxlength of 32 (2 pts)
    • A label for the input element with “From” as its content
    • A textarea element with the id and name attributes set to “body”
    • A label for the textarea element with “Body” as its content
    • A button element of type submit with “Send” as its content
    • A br element between each of the above elements so that they each display on their own line (2 pts)

Results

If the form was created correctly, you should be able to fill out the form and when you click Send, Firefox will open your default email client with an email ready to be sent to your email address with the content of the form in the email’s body.

Your site should look similar to the following.

contact.html after Exercise 8

How to Submit Your Work

Upload your contact.html file to the ‘CS0134-E8-<username>’ Box folder.

Note: When you want to upload a new version of one of your exercise files, click on the file in box and select “Upload New Version”.

I highly recommend that each time you work on this or any other exercise, that you upload your files to Box even if you are not done with the exercise. In this way, if something happens before the submission deadline that keeps you from uploading the finished exercise, there is still something to be graded.