when Med Aid is selected as No. on submit the fields will be cleared
This commit is contained in:
parent
caa0c571fc
commit
e7979854cb
1 changed files with 9 additions and 0 deletions
|
|
@ -523,6 +523,15 @@ class _EditPatientState extends State<EditPatient> {
|
||||||
|
|
||||||
void submitForm() {
|
void submitForm() {
|
||||||
if (isFieldsFilled()) {
|
if (isFieldsFilled()) {
|
||||||
|
if (!medRequired) {
|
||||||
|
setState(() {
|
||||||
|
medMainMemController.text = "";
|
||||||
|
medNoController.text = "";
|
||||||
|
medAidCodeController.text = "";
|
||||||
|
medNameController.text = "";
|
||||||
|
medSchemeController.text = "";
|
||||||
|
});
|
||||||
|
}
|
||||||
updatePatientApiCall();
|
updatePatientApiCall();
|
||||||
} else {
|
} else {
|
||||||
showDialog(
|
showDialog(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue