main icon indicating copy to clipboard operation
main copied to clipboard

support dropdowns in custom forms

Open aguestuser opened this issue 7 years ago • 0 comments

Acceptance Criteria

Given I am a sysadmin creating a new SignupForm from the console:

  • When I specify a field that requires a dropdown (see list in Definitions) then view the form, I should see a dropdown for that form input without doing further work

Definitions

Form fields that support dropdowns include:

  • Person.addresses_region
  • (more?)

Context

  • we hoped to implement this in #476, but descoped it to ship on time
  • playing this card will be necessary to support custom form fields for gender, ethnicities, languages spoken (which are enums)

Implementation notes

  • this likely involves some logic in subclasses of FormInputGroup to dispatch off of the input name and produce a hash of data representing field type and (if a select field) its options
  • view logic would need to be able to parse this hash and generate fields accordingly
  • we can probably do all of this without persisting seralized hashes in postgres (we currently persist an array of strings in the inputs column)

aguestuser avatar Feb 08 '18 19:02 aguestuser