Skip to content

Commit 3475262

Browse files
author
Sanajt Jana
committed
update first name
1 parent 5071232 commit 3475262

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

src/App.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState, React } from "react";
22

33
const App = () => {
44
//name load state
5-
const [nameValue, setnameValue] = useState("");
5+
const [fnameValue, setnameValue] = useState("");
66
const [NameView, setNameView] = useState(""); //button click state
77

88
//email load state
@@ -14,7 +14,7 @@ const App = () => {
1414
const [mobileView, setmobileView] = useState(""); //button click state
1515

1616
//name show fucn
17-
const nameFucn = (nameKeyValue) => {
17+
const fnameFucn = (nameKeyValue) => {
1818
setnameValue(nameKeyValue.target.value);
1919
};
2020

@@ -31,7 +31,7 @@ const App = () => {
3131
//button click fucn
3232
const onSubmit = (e) => {
3333
e.preventDefault();
34-
setNameView(nameValue);
34+
setNameView(fnameValue);
3535
setEmailView(EmailValue);
3636
setmobileView(mobileValue);
3737
};
@@ -56,8 +56,9 @@ const App = () => {
5656
type="text"
5757
id="form6Example1"
5858
class="form-control"
59-
onChange={nameFucn}
60-
value={nameValue}
59+
onChange={fnameFucn}
60+
value={fnameValue}
61+
required
6162
/>
6263
</div>
6364
</div>
@@ -68,7 +69,14 @@ const App = () => {
6869
<label class="form-label" for="form6Example2">
6970
Last name
7071
</label>
71-
<input type="text" id="form6Example2" class="form-control" />
72+
<input
73+
type="text"
74+
id="form6Example2"
75+
// onChange={lnameFucn}
76+
// value={lnameValue}
77+
class="form-control"
78+
required
79+
/>
7280
</div>
7381
</div>
7482
</div>
@@ -100,6 +108,7 @@ const App = () => {
100108
class="form-control"
101109
onChange={emailFucn}
102110
value={EmailValue}
111+
required
103112
/>
104113
</div>
105114

@@ -109,11 +118,12 @@ const App = () => {
109118
Phone
110119
</label>
111120
<input
112-
type="text"
121+
type="phone"
113122
id="form6Example6"
114123
class="form-control"
115124
onChange={mobileFucn}
116125
value={mobileValue}
126+
required
117127
/>
118128
</div>
119129

0 commit comments

Comments
 (0)