# Add extra depth to input field in form\_for

**URL:** <https://www.ruby-forum.com/t/add-extra-depth-to-input-field-in-form-for/173356>\
**Category:** Rails\
**Created:** [August 7, 2009, 9:05am UTC](https://www.ruby-forum.com/t/add-extra-depth-to-input-field-in-form-for/173356 "2009-08-07T09:05:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iggar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a88e57/32.png) [@iggar](https://www.ruby-forum.com/u/iggar)\
**Post date:** [August 7, 2009, 9:05am UTC](https://www.ruby-forum.com/t/add-extra-depth-to-input-field-in-form-for/173356/1 "2009-08-07T09:05:57Z")

</div>

Hey all,

I’m making a table form in rails who roughly looks like this:

(form\_for :info,…)  
Header1  
Item 1 yes/no comment  
Item 2 yes/no comment

Header2  
Item 1 yes/no comment  
Item 2 yes/no comment

What i would like to do is that the name of the combobox (yes/no) would  
be info[header1][item1][yesno] and the comment  
info[header1][item1][comment]

For item 2 this would have to be info[header1][item2][yesno] and so on.

Any suggestions about the best approach for this?

Thanks!
