Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Nested forms with rows like a table

General • Asked by John Munyi

Hi Chris,

I am battling nested forms , but not your standard .. what I want is a situation where the form behaves like a table where each new row will represent the object from the partial(nested-fields) and if possible populate some data and then i can mass update the other fields.... picture a class register when you can mass update present or absent .....

As a form it works but i dont want to replicate the labels any leads?

cheers


Sounds like a fun little form. :)

So you have a working form but wan to make it look like a table? Is that correct?


Yes I have a working nested form.

So I want it to look like a table with heading and also pre load some fields with data


You could either do this with CSS or you can probably just wrap the form around a table and put the fields inside the cells like this: https://www.cs.tut.fi/~jkorpela/forms/tables.html


Will check-it out and let you know how it goes


Hi Chris the table worked brilliantly.. but i am still struggling with automatically populating the nested form with related record.. is it even possible in the first place ? such that if one selects a team drop down and click add attendance a specific number of rows are added with the team members names of the persons in that team and all is left is to check absent or present


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.