About Creating a Form Element

About Creating a Form Element
0

#1

Could someone tell me what I’m doing wrong on this lesson 30?

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

I got everything working except for MAKE SURE YOUR FORM HAS AN ACTION ATTRIBUTE WHICH IS SET TO /SUBMIT CAT PHOTO. I thought I did that in the above line? Could someone explain, please?


#2

I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#3

Thank you for showing me the proper format for leaving code, Ben.

However, you never answered the question on why my above code didn’t work in lesson 30. If you could show me or if anyone could please tell me the answer, I would be so grateful.

I got everything working except for MAKE SURE YOUR FORM HAS AN ACTION ATTRIBUTE WHICH IS SET TO /SUBMIT CAT PHOTO. I thought I did that in the above line? Could someone explain, please?


#4

“submit-cat-photo” !== “/submit-cat-photo”

The challenges are not numbered, so please add a link to the challenge next time.


#5

Hi,

I just tried “submit-cat-photo” !== “/submit-cat-photo” but it still didn’t work. In fact, it unnested. Where was it meant to go? I tried several versions but it still didn’t work. Here is my original again.

I am so confused. Please help.

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


#6

The instructions state:
Nest your text field in a form element. Add the action="/submit-cat-photo" attribute to this form element.

@BenGitter was trying to tell you that when you wrote action=“submit-cat-photo”, it is not the same as what the instructions wanted. The instructions wanted action="/submit-cat-photo". He was using the !== reference to let you know the two strings were not equal (not the same).


#7

THANK YOU, Randel! I finally understand what Ben was trying to convey.

@BenGlitter Thank you too!