[web-devel] Caustom layouts for forms

Michael Snoyman michael at snoyman.com
Sun Mar 20 18:52:10 CET 2011

On Sun, Mar 20, 2011 at 6:27 PM,  <vagif.verdi at gmail.com> wrote:
> There are few utility functions like fieldsToTable that contsruct a form in
> particular layout (one column table, divs etc.) But often we need to construct
> a form with custom layout. How do i get individual rendered form fields (in a
> list or map) to splice them into my template the way i see fit ?

I apologize in advance for the vagueness of this email, I don't have
time to give it a proper answer currently. Hopefully others can help
flesh out the details until I have a bit more time to explain

The datatypes from yesod-form provide both an Applicative and a Monad
interface. The Applicative interface gives you very terse code at the
cost of constraining your output. Monad will require a bit more typing
but gives you complete freedom of display.


More information about the web-devel mailing list