11import React , { useCallback } from 'react' ;
2- import { Form , Col , Button } from "react-bootstrap" ;
32import './Pages.css' ;
43
54const Contact = ( ) => {
5+
6+ // const FormData = useState()
7+
68 const formSubmit = useCallback ( ( e ) => {
79 e . preventDefault ( )
810 } )
11+
912 return (
1013 < React . Fragment >
1114 < div className = "container-fluid" >
@@ -15,41 +18,41 @@ const Contact = () => {
1518 < small > Let us know what kind of support you want</ small >
1619 </ div >
1720 < div className = "col-6 mx-auto" id = "form" >
18- < form className = "row g-3" >
21+ < form className = "row g-3" onSubmit = { formSubmit } >
1922 < div className = "col-md-6" >
2023 < label htmlFor = "firstName" class = "form-label" > First Name</ label >
21- < input type = "text" class = "form-control" placeholder = "Joe" id = "firstName" name = "fname" />
24+ < input type = "text" class = "form-control" placeholder = "Joe" id = "firstName" name = "fname" onChange = { FormData } />
2225 </ div >
2326 < div className = "col-md-6" >
2427 < label htmlFor = "lastName" className = "form-label" > Last Name</ label >
25- < input type = "text" className = "form-control" placeholder = "Lee" id = "lastName" name = "lname" />
28+ < input type = "text" className = "form-control" placeholder = "Lee" id = "lastName" name = "lname" onChange = { FormData } />
2629 </ div >
2730 < div class = "col-12" >
28- < label htmlFor = "email" class = "form-label" > Email</ label >
29- < input type = "email" class = "form-control" placeholder = "j.lee@email.com" id = "email" name = "email" />
31+ < label htmlFor = "email" className = "form-label" > Email</ label >
32+ < input type = "email" className = "form-control" placeholder = "j.lee@email.com" id = "email" name = "email" onChange = { FormData } />
3033 </ div >
3134 < div class = "col-12" >
32- < label htmlFor = "phonenumber" class = "form-label" > Contact Number</ label >
33- < input type = "text" class = "form-control" placeholder = "Contact Number (optional)" id = "phonenumber" name = "contact" />
35+ < label htmlFor = "phonenumber" className = "form-label" > Contact Number</ label >
36+ < input type = "text" className = "form-control" placeholder = "9123456789 (optional)" id = "phonenumber" name = "contact" onChange = { FormData } />
3437 </ div >
3538 < div class = "col-12" >
36- < label htmlFor = "businesstype" class = "form-label" > Business</ label >
37- < input type = "text" class = "form-control" placeholder = "Drugs & Chemist" id = "businesstype" name = "business" />
39+ < label htmlFor = "businesstype" className = "form-label" > Business</ label >
40+ < input type = "text" className = "form-control" placeholder = "Drugs & Chemist" id = "businesstype" name = "business" onChange = { FormData } />
3841 </ div >
3942 < div class = "col-12" >
40- < label htmlFor = "message" class = "form-label" > Service</ label >
41- < textarea type = "text" class = "form-control" placeholder = "What's service you want from us" id = "message" name = "message" > </ textarea >
43+ < label htmlFor = "message" className = "form-label" > Service</ label >
44+ < textarea type = "text" className = "form-control" placeholder = "What's service you want from us" id = "message" name = "message" > </ textarea >
4245 </ div >
4346 < div class = "col-md-6" >
44- < label htmlFor = "inputCity" class = "form-label" > City </ label >
45- < input type = "text" class = "form-control" id = "inputCity" />
47+ < label htmlFor = "inputCity" className = "form-label" > Address </ label >
48+ < input type = "text" className = "form-control" placeholder = "E-Block Sector 2, Salt Lake City" id = "inputCity" onChange = { FormData } />
4649 </ div >
4750 < div class = "col-md-6" >
48- < label for = "inputZip" class = "form-label" > Zip</ label >
49- < input type = "text" class = "form-control" id = "inputZip" />
51+ < label for = "inputZip" className = "form-label" > Zip</ label >
52+ < input type = "text" className = "form-control" placeholder = "700019" id = "inputZip" onChange = { FormData } />
5053 </ div >
5154 < div class = "col-12" >
52- < button type = "submit" class = "btn btn-primary" > Your Feddback</ button >
55+ < button type = "submit" className = "btn btn-primary" > Your Feddback</ button >
5356 </ div >
5457 </ form >
5558 </ div >
0 commit comments