# My Form code doesn't work

**URL:** <https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [March 16, 2020, 8:35pm UTC](https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650 "2020-03-16T20:35:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelraysor1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/michaelraysor1/32/136940_2.png) [@michaelraysor1](https://forum.freecodecamp.org/u/michaelraysor1)\
**Post date:** [March 16, 2020, 8:35pm UTC](https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650/1 "2020-03-16T20:35:57Z")

</div>

**Tell us what’s happening:**  
What am I missing? I put form tags around the type and action, but still missing something.

**Your code so far**

```html

<h2>CatPhotoApp</h2>
<main>
 <p>Click here to view more <a href="#">cat photos</a>.</p>

 <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

 <p>Things cats love:</p>
 <ul>
   <li>cat nip</li>
   <li>laser pointers</li>
   <li>lasagna</li>
 </ul>
 <p>Top 3 things cats hate:</p>
 <ol>
   <li>flea treatment</li>
   <li>thunder</li>
   <li>other cats</li>
 </ol>
<form type="text" placeholder="cat photo URL"></form>

<form action="/submit-cat-photo"></form>
</main>

```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36`.

**Challenge:** Create a Form Element

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/create-a-form-element)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [March 16, 2020, 8:37pm UTC](https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650/2 "2020-03-16T20:37:00Z")

</div>

it seems you do not have an input element anymore  
and the input element should be nested inside the form element

at this time you just have two empty form elements

---

<div class="post-metadata">

**Author:** ![RichardV](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/richardv/32/130703_2.png) [@RichardV](https://forum.freecodecamp.org/u/RichardV)\
**Post date:** [March 16, 2020, 10:24pm UTC](https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650/3 "2020-03-16T22:24:33Z")

</div>

Hey,

You’ve changed the text input into a form. This input should be inside the form. You’ve made a second set of form tags for the ‘action’ . You can just add the action to the first set of form tags like this:

`<form action="/submit-cat-photo"></form>`

You also need an input element inside the form itself, after the opening tag and before the closing tag. It’s in the default code and it looks like you might have changed its tags into form tags, but this is the original:

`<input type="text" placeholder="cat photo URL">`

Hope that helps.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [May 31, 2021, 5:49pm UTC](https://forum.freecodecamp.org/t/my-form-code-doesnt-work/359650/4 "2021-05-31T17:49:16Z")

</div>


