validation

This commit is contained in:
sonika 2023-08-27 20:52:20 +05:30
parent 04a1a2b8be
commit 93eb3e0cb2
3 changed files with 11 additions and 3 deletions

View File

@ -12,7 +12,7 @@
.collapsable-form-style-form7 .MuiInputBase-root { .collapsable-form-style-form7 .MuiInputBase-root {
width: 400px !important; width: 400px !important;
margin: 5%; margin: 3%;
height: 50px height: 50px
} }
@ -30,7 +30,7 @@
} }
.collapsable-form-style-form7 label { .collapsable-form-style-form7 label {
padding: 20px; padding: 13px;
} }
.collapsable-form-style-radioButtons{ .collapsable-form-style-radioButtons{

View File

@ -109,7 +109,7 @@ export default function PatientForm(){
<> <>
<Paper elevation={0} className='app-screen-constants'> <Paper elevation={0} className='app-screen-constants'>
<Header/> <Header/>
<Paper elevation={0} sx={{margin:4, minHeight:700}} > <Paper elevation={0} sx={{margin:4, minHeight:550}} >
<form onSubmit={handleSubmit}> <form onSubmit={handleSubmit}>
<Typography sx={{fontSize:20}} gutterBottom> <Typography sx={{fontSize:20}} gutterBottom>
Confidential Patient Information Confidential Patient Information

View File

@ -105,6 +105,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.excercise!=='Yes'}
variant="outlined" variant="outlined"
label="Times per week?" label="Times per week?"
name='treatmentGoal' name='treatmentGoal'
@ -138,6 +139,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.tobacco!=='Yes'}
variant="outlined" variant="outlined"
label="Packs/Cans per day(If you have quit, when did you quit?)" label="Packs/Cans per day(If you have quit, when did you quit?)"
name='treatmentGoal' name='treatmentGoal'
@ -171,6 +173,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.alcohol!=='Yes'}
variant="outlined" variant="outlined"
label="How many drinks per week?" label="How many drinks per week?"
name='treatmentGoal' name='treatmentGoal'
@ -204,6 +207,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.healthyDiet!=='No'}
variant="outlined" variant="outlined"
label="If no, explain" label="If no, explain"
name='treatmentGoal' name='treatmentGoal'
@ -237,6 +241,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.sleep!=='No'}
variant="outlined" variant="outlined"
label="If no, explain" label="If no, explain"
name='treatmentGoal' name='treatmentGoal'
@ -270,6 +275,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.workSchool!=='Yes'}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'
@ -303,6 +309,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.familyLife!=='Yes'}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'
@ -336,6 +343,7 @@ export default function RecreationalHobbiesSection7(){
<Grid item xs={6} className='collapsable-form-style-form7'> <Grid item xs={6} className='collapsable-form-style-form7'>
<TextField <TextField
disabled={values.drugs!=='Yes'}
variant="outlined" variant="outlined"
label="If yes, explain" label="If yes, explain"
name='treatmentGoal' name='treatmentGoal'