Create a Form Element- Help needed

I am having problem writing this code. I really need some help, i have been on this for days now. It’s frustrating.

<form action="/submit-cat-photo">
<input type="text" placeholder="cat photo URL">
</form>
</main>

Your browser information:

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

Challenge: Create a Form Element

Link to the challenge:

If you could please gives us the code that you have at the moment it would be easier for us to see what the problem might be :smiley: and try to relax, sometimes you need to take a break to think and see things clearly.

CatPhotoApp

Click here to view more 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

This is the task: Nest your text field inside a form element, and add the action="https://freecatphotoapp.com/submit-cat-photo" attribute to the form element.
Thanks

<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 action="/submit-cat-photo">


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


  </form>



</main>

@ricardo.furbina meant to post the code not the result.

1 Like

Yeah that’s what I meant, but I can tell you that what you need to do is put the Input (which type is text) inside a form tag, like this:

< form >
< input >
< /form >

Then you need to put the attribute (which they already give you, you just need to copy and paste) in the form tag, like this:

< form attribute >
< input >
< /form >

And this should work, I hope it helps you, if you have any other question let me know, and don’t give up, I know it is difficult at first but if you keep going and keep practicing you’ll soon learn a lot of things :smiley:

Hello, as said previously the input tag need to be in between the opening and closing tag of the form element

<form action="https://freecatphotoapp”>
<input type=“text”>
<input type=“Submit”>
</form>

Don’t forget to set id’s and other attribute according to the exercises instruction.

Action determine the adresse where your form inputs will be send to be processed.

I don’t know what i am doing wrong but i still can’t run the program yet. :frowning_face: :frowning_face: :frowning_face:

This is what i am doing so far, i don’t know if it could help to see where i am getting something wrong.

and this is the task: Nest your text field inside a form element, and add the action="https://freecatphotoapp.com/submit-cat-photo" attribute to the form element.

I did exactly this but the program won’t run still.

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 (’).

I think the problem is the url for the action, it seems like you only have “/submit-cat-photo” when it should be “https://freecatphotoapp.com/submit-cat-photo”, try changing that and see if it works :smiley:

Thanks, it’s all new to me. My apologies.

I have tried using the full URL and i keep getting the same error; " Your
form should have an action attribute which is set to https://freecatphotoapp.com/submit-cat-photo"…

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

This is the code that works for the challenge, compare it to the one you have and see if something’s not right, and let me know what happens :smiley: