Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically generate forms from server data #7

Open
jensren opened this issue Nov 7, 2021 · 0 comments
Open

Dynamically generate forms from server data #7

jensren opened this issue Nov 7, 2021 · 0 comments
Labels

Comments

@jensren
Copy link
Collaborator

jensren commented Nov 7, 2021

Multiple organizations will be using our application, and each organization will want to have multiple forms. In the most simple case, an organization might have a volunteer application form and a form to fill out to request for help. A more complicated use case might involve forms for different parties (e.g. educators vs. regular individuals) or forms for different services the organization offers. To support these use cases, our application will dynamically generate forms from data returned by the server rather than having forms hard-coded on the client side.

Current State

  • The GraphQL-based backend is still in development so it is not possible to retrieve data from a real server. As a temporary measure, hard-coded example JSON data and schema are returned
  • Only the Volunteer Application Form is dynamically generated
  • Formik is used to manage form data
  • FormikComponent generates the form from a list of FormSections (a custom type)
  • Forms are validated by Formik using Yup schemas
  • Only text-type fields (e.g. input, email, phone number, number), radio, and checkbox fields can be dynamically generated

In this Epic

  • All forms should be generated by passing JSON data into FormikComponent
  • GraphQL should be used to load the JSON data from the server
  • Forms should support optional pagination
  • Form sections should be made optional
  • Forms should submit data by saving to local storage, as a temporary implementation until GraphQL submission is set up
@jensren jensren added the Epic label Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant