freeCodeCamp
freeCodeCamp copied to clipboard
Possible typo in the instruction of Cat Photo App Step 42
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.
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 submit
to the button
to make it clear that this is a submit button."
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 valuesubmit
to thebutton
to make it clear that this is a submit button."
FYI, I purposely left out the word "explicitly" because it seems like a word that could potentially cause trouble for ESL campers.
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."
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.