bcgov / invasivesBC-mussels-iOS

Apache License 2.0
0 stars 4 forks source link

Inspect205 add null state prev inspection #230

Closed davidclaveau closed 1 year ago

davidclaveau commented 1 year ago

This adds the Null State Switch to the form input library. Form variables from the WatercraftInspection model can now have an interaction state. The Null State Switch uses this "interactedWith" Boolean, cross referenced with the form field's "validationName" name, to check if it's been selected ("yes" or "no") by the user. While the switch itself is a Boolean, and is in a false state by default, the interactedWith state can be used in validation checks to ensure that the user isn't submitting a form field without selecting either "yes" or "no".

Changelog:

Example of Null Switch:

Screenshot 2023-02-13 at 12 22 14 PM

Example of new validation alerts:

Screenshot 2023-02-13 at 12 26 49 PM