main
main copied to clipboard
support dropdowns in custom forms
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
FormInputGroupto 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
inputscolumn)