Be Brav3

FCC Challenge 29: Create a Form Element

March 12, 2016

In Free Code Camp Challenge 29 we’re submitting a form to the server.

You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.

For example:

[html]

[/html]

Nest your text field in a form element. Add the action=”/submit-cat-photo” attribute to this form element.

The original code is below:

[html]

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
[/html]

The updated code with form submission is below:

[html highlight=”46-48″]

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
[/html]