6
votes

I need to make a table with an editable column. Each row is a separate record. I want to be able to display hundreds of records, perform edits to them and then submit them back to the server for updating. I am not sure this is really supported by the forms infrastructure.

Is there a way to make a repeatable form such that I would get a list of results back? This seems to be the closest solution I can envision without writing my own in javascript. Any ideas on this would be welcome.

1
Do the edits you will perform include insertion, deletion, and reordering? If you can do without these things, then implementing this could be fairly simple. If you need these things, then you almost certainly need some JavaScript for a smooth user experience (JQuery has some pluigns to help with this sort of thing), and serializing to and from Yesod forms could get complicated. - Dan Burton

1 Answers

1
votes

Don't reinvent the wheel. Just use one of the full featured js grids like jqgrid or extjs if you want the full pack of UI components. I use jqgrid with yesod, edit rows both in grid and in outside panel and submit the changes back.

I think the problem with your approach is that you found your hammer (yesod forms library) and now looking for a nail. You don't have to use every bit of yesod just because its there.