-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added dropdown in gender selection #32
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,23 +63,13 @@ const DriverRegistration = ({ data }) => { | |
|
||
const handleSubmit = (e) => { | ||
e.preventDefault(); | ||
// localStorage.setItem('formData', JSON.stringify(formData)); | ||
router.push({ | ||
pathname: '/create-ride', | ||
}); | ||
}; | ||
|
||
// const handleSubmit = (e) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep these comments as they were... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2 |
||
// e.preventDefault(); | ||
// console.log(formData); | ||
|
||
// localStorage.setItem('formData', JSON.stringify(formData)); | ||
// window.location.href = '/create-ride'; | ||
// }; | ||
|
||
const handleCarChange = (event, newValue) => { | ||
setSelectedCar(newValue); | ||
// const { carName, value } = event.target; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3 |
||
setFormData({ | ||
...formData, | ||
['carName']: newValue.Combined_Name, | ||
|
@@ -119,13 +109,17 @@ const DriverRegistration = ({ data }) => { | |
</div> | ||
<div className={styles.formGroup}> | ||
<label className={styles.label}>Gender:</label> | ||
<input | ||
type="text" | ||
<select | ||
id="gender" | ||
name="gender" | ||
onChange={handleChange} | ||
className={styles.inputField} | ||
/> | ||
> | ||
<option value="">Select Gender</option> | ||
<option value="Male">Male</option> | ||
<option value="Female">Female</option> | ||
<option value="Other">Other</option> | ||
</select> | ||
</div> | ||
<div className={styles.formGroup}> | ||
<label className={styles.label}>Phone:</label> | ||
|
@@ -160,13 +154,11 @@ const DriverRegistration = ({ data }) => { | |
defaultValue={selectedCar.Combined_Name} | ||
onChange={handleCarChange} | ||
renderInput={(params) => <TextField {...params} label="Select Car" variant="outlined" />} | ||
// className={styles.inputField} | ||
sx={{width: '83%'}} | ||
/> | ||
|
||
</div> | ||
<div className={styles.formGroup}> | ||
|
||
<label className={styles.label} >Car Capacity(Max. Num of Passengers):</label> | ||
<input | ||
type="text" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1