File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed
docs/tutorials/essentials Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -442,7 +442,13 @@ export const AddPostForm = () => {
442442 <h2 >Add a New Post</h2 >
443443 <form onSubmit = { handleSubmit } >
444444 <label htmlFor = " postTitle" >Post Title:</label >
445- <input type = " text" id = " postTitle" defaultValue = " " required />
445+ <input
446+ type = " text"
447+ id = " postTitle"
448+ name = " postTitle"
449+ defaultValue = " "
450+ required
451+ />
446452 <label htmlFor = " postContent" >Content:</label >
447453 <textarea
448454 id = " postContent"
@@ -604,7 +610,13 @@ export const AddPostForm = () => {
604610 <h2 >Add a New Post</h2 >
605611 <form onSubmit = { handleSubmit } >
606612 <label htmlFor = " postTitle" >Post Title:</label >
607- <input type = " text" id = " postTitle" defaultValue = " " required />
613+ <input
614+ type = " text"
615+ id = " postTitle"
616+ name = " postTitle"
617+ defaultValue = " "
618+ required
619+ />
608620 <label htmlFor = " postContent" >Content:</label >
609621 <textarea
610622 id = " postContent"
Original file line number Diff line number Diff line change @@ -751,7 +751,13 @@ const AddPostForm = () => {
751751 <h2 >Add a New Post</h2 >
752752 <form onSubmit = { handleSubmit } >
753753 <label htmlFor = " postTitle" >Post Title:</label >
754- <input type = " text" id = " postTitle" defaultValue = " " required />
754+ <input
755+ type = " text"
756+ id = " postTitle"
757+ name = " postTitle"
758+ defaultValue = " "
759+ required
760+ />
755761 // highlight-start
756762 <label htmlFor = " postAuthor" >Author:</label >
757763 <select id = " postAuthor" name = " postAuthor" required >
Original file line number Diff line number Diff line change @@ -649,7 +649,13 @@ export const AddPostForm = () => {
649649 <h2 >Add a New Post</h2 >
650650 <form onSubmit = { handleSubmit } >
651651 <label htmlFor = " postTitle" >Post Title:</label >
652- <input type = " text" id = " postTitle" defaultValue = " " required />
652+ <input
653+ type = " text"
654+ id = " postTitle"
655+ name = " postTitle"
656+ defaultValue = " "
657+ required
658+ />
653659 <label htmlFor = " postContent" >Content:</label >
654660 <textarea
655661 id = " postContent"
You can’t perform that action at this time.
0 commit comments