diffusionkinetics / open

DiffusionKinetics open-source monorepo
MIT License
115 stars 24 forks source link

Youido forms: configurable layout #93

Open glutamate opened 6 years ago

glutamate commented 6 years ago

It should be possible to customise the layout of forms. It is already possible to completely rewrite the form appearance by overwriting renderForm in the FromForm instance (https://github.com/diffusionkinetics/open/blob/balaji/generic-digestive-form/youido/lib/Youido/Types.hs#L400). But that's an all or nothing approach.

There is also an Options datatype that can be used to configure the form processing. Can we expand that with a field that influences how the form is laid out? Ideally that field would be a function so that I can implement entirely new ways of rendering forms using new markup vocabulary and things would be truly extensible. But that might be a lot of work. Instead we could just have a simple Enum type for couple of options.

Bootstrap 3 gives 3 different form layouts: basic, in-line and horizontal: https://getbootstrap.com/docs/3.3/css/#forms - this could be a good place to start