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:
Add new Null State Switch. This switch will be displayed in a "null" state (no option chosen by default) and can be toggled either "yes" or "no" by the user.
Add the Null State Switch to k9 Inspection and Previous Inspection and/or Agency Notified form fields.
Add validation checks to several fields. Users are prompted if any validation check fails with an alert; any incomplete fields must be completed to continue.
Validation checks have been added to the following fields:
k9 Inspection (must be toggled "yes" or "no")
Watercraft Type (at least one watercraft type must be greater than 0)
Previous Inspection and/or Agency Notified and its dependent fields (must be toggled "yes" or "no" - its dependent fields must be completed if "yes" was selected).
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:
Example of new validation alerts: