Why is Catapp code not working

Why is my code not working?:
I have tried suggestions here but the codes don’t work i am not sure what i am doing wrong. Can someone help me?

  **Your code so far**

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

<a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

<p>Things cats love:</p>
  <li>cat nip</li>
  <li>laser pointers</li>
<p>Top 3 things cats hate:</p>
  <li>flea treatment</li>
  <li>other cats</li>
<input type="text" placeholder="cat photo URL">
<form action="/url-https://www.freecatphotoapp.com/submit-cat-photo"><input type="text" placeholder="cat photo URL"></form>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36

Challenge: Create a Form Element

Link to the challenge:

I think the issue might be related to this instruction:
Nest the existing input element inside a form element.

Your input element is outside of the form element.

<input type="text" placeholder="cat photo URL">
<form action="/url-https://www.freecatphotoapp.com/submit-cat-photo"><input type="text" placeholder="cat photo URL"></form>

So is this the correct code you provided? Is it just me or are these instructions tricky?

I just copied your code. The correct code would be:

<form action="/url-https://www.freecatphotoapp.com/submit-cat-photo"><input type="text" placeholder="cat photo URL">
<input type="text" placeholder="cat photo URL">

I think once we wrap our heads around the terminology, it gets easier :+1:


It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

I tried this and i am still getting an error code that says, Your form should have an action attribute which is set to https://www.freecatphotoapp.com/submit-cat-photo .
I am not sure what I am doing wrong. This is what happend when i worked it out for myself as well prior.

If you tried the code @CedarStar provided you, then it is incorrect.

Your code should only have one input.
Not two.

And the action attribute needs to be the one from the instructions.

This is the correct action attribute.
assign "https://www.freecatphotoapp.com/submit-cat-photo" to the action attribute

This is incorrect.

I would reset the lesson,
Wrap your form tags around the existing input which is this.

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

Make sure to use the correct action attribute from the directions.

Hope that helps! :grinning:

Oops! You’re right - I copy and pasted without double-checking :woman_facepalming:

Thanks for pointing that out!

1 Like

I think the language is throwing me off I am still trying to understand how to do this I am not sure what text wrap means or where exactly to put everything. I work for amazon and i am trying to get into this program but this is harder than i thought.

Make sure you have reset the lesson.
Take a close look at what I wrote here.

Use that input that is already there.
The lesson already gave you an input to use and I am pointing it out to you in the code.
Do not create a new one.

You need to place your opening form tag above the input.

This is the basic structure of the opening form tag.

<form action="URL GOES HERE">

This is the url you are supposed to use for the action attribute.
Replace URL GOES HERE with that one from the directions.

Below the input you have your closing form tag.


You should only add a total of two lines of code.
One above the existing input I showed you.
One line of code below the existing input.

If you are adding more lines of code or creating a new input then it is incorrect.

Hope that helps!

Yay i found out that last part ! I am struggling though with adding a submission button my button shows up and it submits correctly but my code says its incorrect.

<form><button type="submit"</button></form> 

I am also seeing its not posting all my code in here

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Is this the same lesson or a new one.

If you are working on a new lesson, then you should make a new post using the Ask for help button.

Also, it looks like you have a syntax error here.

You are missing the > after submit

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.