Skip to content

Commit d9318b7

Browse files
committed
fix fix fix fix fix fix
1 parent 3bccf71 commit d9318b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/application/ApplicationForm.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ export const ApplicationForm = (): ReactElement => {
5959
// effects
6060
const resetFields = form.resetFields;
6161

62+
console.log(form.getFieldsValue());
63+
6264
useEffect(() => {
6365
if (alreadySubmitted || isBeforeRegistration || isAfterRegistration) {
6466
setDisabled(true);
65-
resetFields();
67+
form.setFieldsValue(submittedFormData.current);
6668
}
6769
getStatusData().then((status) => {
6870
setAppStatus(status?.applicationStatus);
@@ -88,7 +90,6 @@ export const ApplicationForm = (): ReactElement => {
8890
newFormData[String(questionIndex + 1)] = response;
8991
submittedFormData.current = newFormData;
9092
});
91-
console.log('setting', newFormData);
9293
form.setFieldsValue(newFormData);
9394
}, [userResponses]);
9495

@@ -215,6 +216,7 @@ export const ApplicationForm = (): ReactElement => {
215216
className="cancel-edit-button"
216217
onClick={() => {
217218
setDisabled(true);
219+
console.log(form.getFieldsValue());
218220
form.resetFields();
219221
}}
220222
>

0 commit comments

Comments
 (0)