Change example for Basic HTML and HTML5: Create a Form Element
See original GitHub issueHi there! I would like to discuss a change to the example given in the create a form element challenge. This trips up a lot of people and is always brought up in the forum.
https://forum.freecodecamp.org/search?q=create a form element after%3A2020-12-01
I think a small change to the example would help a lot of people.
Describe your problem and how to reproduce it:
Existing example: <form action="/url-where-you-want-to-submit-form-data"></form>
Possible change: <form action="https://submit-form-data.com"><input></form>
Using https:// at the beginning of the action will hopefully get people to correctly use the url provided. Placing the input inside the form will hopefully fix the confusion around nesting.
I think a lot of beginners look to the examples to help them with the challenges. So I think making these changes should help. While it might look like we are giving them the answer with this proposed change, there have been previous html challenges where the example was basically the answer.
https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/add-images-to-your-website https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements
Add a Link to the page with the problem: https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/create-a-form-element
Tell us about your browser and operating system:
- Browser Name:
- Browser Version:
- Operating System:
If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
<form action="/url-where-you-want-to-submit-form-data">
My only concern about changing this is that this is a common syntax when you are building a full-stack application.
Often times, you’ll have your
form
element send apost
request to a specific endpoint on your server, which means instead of writing the full link you use/login
(as an example).Can we do a combination of keeping the opening tag the way it is and adding the input tag to the example?
<form action="/url-where-you-want-to-submit-form-data"><input></form>