thoth-org / Thoth.Elmish.FormBuilder

https://thoth-org.github.io/Thoth.Elmish.FormBuilder/
MIT License
10 stars 5 forks source link

FormBuilder and layout #11

Open MangelMaxime opened 4 years ago

MangelMaxime commented 4 years ago

Issue by juselius Wednesday Jul 10, 2019 at 13:45 GMT Originally opened as https://github.com/MangelMaxime/Thoth/issues/153


I'm toying with FormBuilder and I'm starting to find it quite useful. It makes the actual form implementation much clearer than when doing it by hand.

One thing eludes me: How do I control the layout of the generated forms? For example, I have a form for entering Firstname, Lastname and Gender, and I would like to have the fields one after the other on a single line. How can I do this?

MangelMaxime commented 4 years ago

Comment by MangelMaxime Wednesday Jul 17, 2019 at 06:10 GMT


Perhaps it's doable by implementing a custom field but I am not sure about that.

I am preparing a new version of this library to remove some of the limitations and will make sure to check this feature when doing so.

MangelMaxime commented 4 years ago

Comment by juselius Wednesday Jul 17, 2019 at 07:45 GMT


Sounds good. The best thing would be to decouple presentation and function. But that's easier said than done. The WebSharper folks had a few attempts at creating higher-level form builders, but I think they abandoned the projects in the end (but they used a very different approach). Ideally we would have one set of Fulma-like combinators and one set of validation combinators, coupled trough the FormBuilder MVU. Or something along those lines.