-
Notifications
You must be signed in to change notification settings - Fork 0
/
FormCostumerInformation2.js
114 lines (102 loc) · 3.85 KB
/
FormCostumerInformation2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import { useState } from 'react';
import Button from 'react-bootstrap/Button';
import Col from 'react-bootstrap/Col';
import Form from 'react-bootstrap/Form';
import InputGroup from 'react-bootstrap/InputGroup';
import Row from 'react-bootstrap/Row';
function FormExample() {
const [validated, setValidated] = useState(false);
const handleSubmit = (event) => {
const form = event.currentTarget;
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
setValidated(true);
};
return (
<Form className='form-font' noValidate validated={validated} onSubmit={handleSubmit}>
<Row className="mb-3">
<Form.Group as={Col} md="4" controlId="validationCustom01">
<Form.Label></Form.Label>
<Form.Control
required
type="text"
placeholder="First Name"
defaultValue=""
/>
<Form.Control.Feedback>Looks good!</Form.Control.Feedback>
</Form.Group>
<Form.Group as={Col} md="4" controlId="validationCustom02">
<Form.Label className='form-font'></Form.Label>
<Form.Control className='form-font'
required
type="text"
placeholder="Middle Name"
defaultValue=""
/>
<Form.Control.Feedback className='form-font'>Looks good!</Form.Control.Feedback>
</Form.Group>
<Form.Group as={Col} md="4" controlId="validationCustom02">
<Form.Label className='form-font'></Form.Label>
<Form.Control className='form-font'
required
type="text"
placeholder="Last Name"
defaultValue=""
/>
<Form.Control.Feedback className='form-font'>Looks good!</Form.Control.Feedback>
</Form.Group>
</Row>
<Row className="mb-3">
<Form.Group as={Col} md="6" controlId="validationCustom03">
<Form.Label className='form-font'></Form.Label>
<Form.Control type="text" placeholder="SNN" required />
<Form.Control.Feedback className='form-font' type="invalid">
Please provide a valid item.
</Form.Control.Feedback>
</Form.Group>
<Form.Group as={Col} md="6" controlId="validationCustom03">
<Form.Label>Date of Birth</Form.Label>
<Form.Control type="text" placeholder="Month" required />
<Form.Control.Feedback type="invalid">
Please provide a valid item.
</Form.Control.Feedback>
</Form.Group>
<Form.Group as={Col} md="6" controlId="validationCustom03">
<Form.Label></Form.Label>
<Form.Control type="text" placeholder="Day" required />
<Form.Control.Feedback type="invalid">
Please provide a valid item.
</Form.Control.Feedback>
</Form.Group>
<Form.Group as={Col} md="6" controlId="validationCustom03">
<Form.Label></Form.Label>
<Form.Control type="text" placeholder="Year" required />
<Form.Control.Feedback type="invalid">
Please provide a valid item.
</Form.Control.Feedback>
</Form.Group>
</Row>
{/* <Form.Group className="mb-3">
<Form.Check
required
label="Agree to terms and conditions"
feedback="You must agree before submitting."
feedbackType="invalid"
/>
</Form.Group> */}
{/* <div className='form-buttons'>
<div className='form-buttons1'>
<Button type="submit">Submit</Button>
</div>
<Row className="mb-3">
</Row>
<div className='form-buttons2'>
<Button type="submit">Reset</Button>
</div>
</div> */}
</Form>
);
}
export default FormExample;