# Form helper for an array?

**URL:** <https://www.ruby-forum.com/t/form-helper-for-an-array/177747>\
**Category:** Rails\
**Created:** [October 22, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/form-helper-for-an-array/177747 "2009-10-22T23:25:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix\_SchSSS\_fer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ed8c4c/32.png) [@Felix\_SchSSS\_fer](https://www.ruby-forum.com/u/Felix_SchSSS_fer)\
**Post date:** [October 22, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/form-helper-for-an-array/177747/1 "2009-10-22T23:25:01Z")

</div>

Hello,

I’m looking for a form helper to create text\_fields to populate an  
array parameter to the object the form describes.

More to the point: I’m trying to write a doodle plugin for redmine,  
and I have a form\_for the doodle object calling the form partial  
gisted under [http://gist.github.com/216302](http://gist.github.com/216302) . Amongst other attributes  
for the doodle object, there is the options[] array. The form works  
like a charm, and I am able to create new doodles without a problem,  
but if I have a validation error or use this form for an edit,  
everything but the option fields will be populated correctly. I’m  
aware that that is due to the text\_fields for the options[] being  
created manually rather than through a form helper, but I wasn’t able  
to find one suiting. The closest thing would have been the fields\_for  
helper, but it takes an array of objects, rather than just an array of  
(in this case) strings.

Any help appreciated, thanks!

Felix
