You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
realized while blocked playing 2-step email signup path [3] #613 that cusom forms are heavy and we don't actually need them yet, so we ditched them until we do
by "heavy" i mean: it is difficult to introduce non-text fields into the schema (like passwords and dropdowns) and difficult to run migrations from the schema that worked for just text fields
when groups start asking for different fields in their signup forms or multiple signup forms that allow them to track the source for new signups, then play this
Implementation Notes
currently we store a FormInputGroup that has a string field for inputs and required which is stored in postgres as an array (ie: :inputs, :string, array: true, default: [] settings in the original migration)
we could changes this to :inputs, :text, default: '[]', but is requires non-trivial backfills and breaks rollbacks
instead, i think we should ditch the inputs and required fields altogether and instead introduce a has_many-belongs-to relationship between FormInputGroup and a new class called FormInputGroup
where FormInputGroup has the fields type (an enum with possible values: text, textarea, select, password, etc.), attr_name (for the attribute the form field will create), label (for the form label), and, optionally options (if it is a select).
this will allow cleaner logic for aliasing and recongizing required fields and will generally be cleaner than trying to do it with hashes
it will require slightly rewriting SignupForm.for
The text was updated successfully, but these errors were encountered:
[stub]
Context
Implementation Notes
FormInputGroup
that has astring
field forinputs
andrequired
which is stored in postgres as an array (ie::inputs, :string, array: true, default: []
settings in the original migration):inputs, :text, default: '[]'
, but is requires non-trivial backfills and breaks rollbacksinputs
andrequired
fields altogether and instead introduce ahas_many-belongs-to
relationship betweenFormInputGroup
and a new class calledFormInputGroup
FormInputGroup
has the fieldstype
(an enum with possible values:text
,textarea
,select
,password
, etc.),attr_name
(for the attribute the form field will create),label
(for the form label), and, optionallyoptions
(if it is a select).SignupForm.for
The text was updated successfully, but these errors were encountered: