hack4impact-calpoly / general-vms

General volunteer management system.
2 stars 0 forks source link

[General] Scheme and Investigation for Representing Forms as Data #19

Closed bglossner closed 2 years ago

bglossner commented 2 years ago

This is a software design task. Admins/staff need to be able to create forms and users need to be able to fill them out.

This is based on https://www.notion.so/h4i/Form-creation-ab561f8da7f142dbb40594a8da1e8126

Forms will consist of:

This is probably best achieved partially by using a library like: https://github.com/rjsf-team/react-jsonschema-form. Something that takes a form/schema and dynamically renders the form so we don't have to do so.

ksittner commented 2 years ago

At present, the react-jsonschema-form library appears to be a viable approach for storing and rendering forms for administrators and volunteers. Even though frontend developers will need to implement custom submission actions, some validation functions for fields like phone number and time (not date or date-time), and potentially form templates, using this library will be far more efficient than building this functionality from the gronud up.

I've experimented with the library in a sandbox environment and it appears that the flexible nature of JSON objects will allow us to add necessary fields such as creation date and whether the form can be completed anonymously. In fact, it might even prove advantageous to use this library when creating the form that admininstrators will use to generate internal forms.

The only points of uncertainty that remain are how to integrate the form with our current authentication protocol. I don't believe this will present any issues, but I'll update this once I have a better understanding of how we are maintaining user state.