Help: Creating a form element

Tell us what’s happening:

  **Your code so far**

<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>
<input type="text" placeholder="cat photo URL">
</main>
<form action ="https://freecatphotoapp.com/submit-cat-photo">
<input>
</form>
  **Your browser information:**

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

Challenge: Create a Form Element

Link to the challenge:

1 Like

I’m not quite understanding what the error is here, can someone help?

The existing input element should be nested within a form element.

This means you need to make a form element <form></form>

nest means you need to add it inside.

Thanks for responding to my post! Can you have a look at my code so far? I’m sure that is what I did.

1 Like

I checked you code. You did the other way around.

You need also a closing tag, like this </input>

Nest the existing input element inside a form element and assign "https://freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

This text wants you to add the existing input element inside the form element.

Here is the example in the problem.

<form action="/url-where-you-want-to-submit-form-data">
  <input>
</form>

I’m confused now…

1 Like
<form action="/url-where-you-want-to-submit-form-data">
  <input>
</form>

This is the example from the problem.

1 Like

You almost did it except

This is just an input tag with no closing tag.
Closing tag is like this </input>

And the input tag needs the values. It is an input element in your code with the values, take that one

Replace this one with URL which freecodecamp provided

1 Like

So, it says

Nest the existing input element inside a form element and assign "https://freecatphotoapp.com/submit-cat-photo" to the action attribute of the form element.

1 Like

This code needs the input tag above placed inside, right now it’s just this <input>
Also it needs a closing tag </input>

1 Like

Right I understand. Heres what I changed in my code.

<form action ="https://freecatphotoapp.com/submit-cat-photo">

</input>

</form>
1 Like
<form action ="https://freecatphotoapp.com/submit-cat-photo">

</input>

</form>

Your post is empty @alohadoerbug27

1 Like

So, I’m a bit confused now because I followed the example to nest the input within the form element and insert the given data.

1 Like

Here is the step by step instructions:

Your input element is not nested inside the form element so

  1. Create a form element just below your ol with opening and closing tags
  • Note: Don’t create your form element inside your list (or) ol element
  1. Nest your input element within the form element
1 Like

I can not send my solution again since I sent it twice.

form action " data here">
<input>.    -------------YOUR MENTIONING I NEED TO PUT THE DATA HERE? HOW WOULD THAT WORK?
</form>
1 Like

This is the data. It should be in the input element inside the form element.

Eg:

<some action="whatever">
<whatever type="whatever" placeholder="something">
</some>
1 Like

Switching the input elements places will work, you currently have two of them.

This is the one that should be inside the form element.

Not this one