Skip to content

Commit a28b432

Browse files
Talos0248Copilottimdorr
authored
docs: add "name" attribute to text input form element in AddPostForm.… (#4829)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Tim Dorr <timdorr@users.noreply.github.com>
1 parent ab47d94 commit a28b432

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

docs/tutorials/essentials/part-3-data-flow.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff 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"

docs/tutorials/essentials/part-4-using-data.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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>

docs/tutorials/essentials/part-7-rtk-query-basics.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)