Skip to content

Create a Dynamic Form #4

@mattbatman

Description

@mattbatman

We need to create a dynamic form component that can consume the response data from the queries (as described in #3) and populate itself with the correct fields. This will also involve making components for each individual field.

Handle Field Types

  • Location selection (maybe just add an address input field)
  • Input
  • Text area
  • Single drop-down selection
  • Multi-selection drop-down
  • Handle date inputs
  • Media upload
  • Make sure each field is compliant with React forms (e.g. controlled components where necessary)

API Interaction

On Load

  • Make a call to the serviceDefinition if metadata was true (or undefined or null) in the call for serviceList
  • Merge the response with the list of default fields

On Submit

  • Make a call to the API to post

Styling

  • Fields should be styled in a manner that are a functional, aesthetically pleasing, and consistent with the existing site
  • Handle and display an errors received after an attempted post
  • List fields in the correct order
  • List fields in a logical group

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions