Has anyone created a properly abstract form component for hoplon yet?
I’ll keeping throwing code up here while I figure this out….. but in my mind a form has a few different bits of state [fields data status messages]
some convenience state could be made from status
and messages
like error
, each field has it’s own state as well [data status messages]
flyboarder in the apps i've worked on, each had its own form abstraction
nothing really general has emerged from anywhere afaik, i think because styling can't really be extracted
@alandipert what I am thinking is a bunch of state variables that can be used within the form elements
fields
for example could be passed to an element that builds the field based on it’s type (which is what I currently do)
so all my fields are kept in a db, forms dont actually exist in the code
i see, that's cool. so you have a kind of form-builder-interpreter sounds lik
yeah, except I always have to hard wire the state around the design, I’d like to move that state to a macro that builds it for me I think
like err (j/cell= (when (= status :error) messages))
will always be a local formula
the form fields could all store their state in data
which keeps it local to the form but abstracts it from the field, so {:email email :pass pass}
instead of 2 cells