codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
32 stars 26 forks source link

[Discovery] - Disallow submitting forms that have no input #629

Open andycwilliams opened 6 months ago

andycwilliams commented 6 months ago

Note: This issue is marked for discovery. It is open for discussion and not necessarily decided upon.

Describe the Current Behavior/Feature:

Some of the forms we have allow for submission/confirmation despite having no input or changes being made.

Share Documents modal:

2024-05-09 (4)

Civic Profile Housing form:

2024-05-09 (2)

Rationale:

It doesn't really make sense to allow this. Besides, we already disallow it elsewhere. See:

2024-05-09 (3)

Proposed Changes:

Disable these submission buttons when there is no input.

Possible Drawbacks:

User may want to clear the data they already submitted. Currently that functionality is not in place. Only Basic Information has a clear button but that only clears the current inputs and does not remove the data itself. Housing Information only has a submit button and Financial Information still needs to be created.

rdhss commented 6 months ago

hello, can i work for this issue?

leekahung commented 6 months ago

Think we should do this only for some of the forms where there are required fields like the share documents form. For forms like the Civic Profile forms, all the fields in it are meant to be optional (see issue #442) so they should be able to accept submissions with no input.

If we wish to still have the submit button disabled, we should instead check if any of the fields are changed rather than a blanket disable based on whether there is an input. So, if input is changed, allow submit, else disable it.

So we should check which forms needs this feature.