freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

Possible typo in the instruction of Cat Photo App Step 42

Open sidemt opened this issue 2 years ago • 5 comments

Describe the Issue

At the end of the instruction, it says:

Go ahead and do this to specify where this button should submit the form.

But this step is just asking the camper to add type="submit" to the button element, and not asking them to set the destination where the form should be sent.

Affected Page

https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-42

Your code

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

Expected behavior

The instruction should be "Go ahead and do this to specify that this button should submit the form." or something?

Screenshots

No response

System

  • Device: Laptop
  • OS: Windows 10
  • Browser: Chrome
  • Version: 103.0.5060.134

Additional context

Noticed this during translation.

sidemt avatar Jul 27 '22 19:07 sidemt

Agreed, the use of the word "where" could be slightly confusing since we are already specifying where the form will submit in the action attribute on the form. My suggestion:

"Go ahead and do this to make it clear that this button should submit the form."

Actually, I would reword the entire second paragraph.

"You learned previously that the button submits the form by default. But relying on default behavior may cause confusion. Add the type attribute with the value submitto the button to make it clear that this is a submit button."

bbsmooth avatar Jul 27 '22 23:07 bbsmooth

I vote for the second option, with a small suggestion

"You learned previously that the button submits the form by default, but relying on default behavior may cause confusion. Explicitly add the type attribute with the value submitto the button to make it clear that this is a submit button."

Sboonny avatar Jul 28 '22 01:07 Sboonny

FYI, I purposely left out the word "explicitly" because it seems like a word that could potentially cause trouble for ESL campers.

bbsmooth avatar Jul 28 '22 01:07 bbsmooth

The shorter the better

"The button you added will submit the form by default. Add the type attribute with the value submit to the button to make it clear that it is a submit button."

moT01 avatar Jul 28 '22 13:07 moT01

Thanks everyone for your comments!

I like @moT01 's shorter the better approach, but I also thought it's important to explain why we are doing this. So I included the "But relying on default behavior may cause confusion." part from @bbsmooth 's comment and opened a PR.

sidemt avatar Jul 28 '22 17:07 sidemt