# Dynamic forms

**URL:** <https://www.ruby-forum.com/t/dynamic-forms/79397>\
**Category:** Rails\
**Created:** [November 30, 2005, 1:25am UTC](https://www.ruby-forum.com/t/dynamic-forms/79397 "2005-11-30T01:25:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitesurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kitesurfer](https://www.ruby-forum.com/u/kitesurfer)\
**Post date:** [November 30, 2005, 1:25am UTC](https://www.ruby-forum.com/t/dynamic-forms/79397/1 "2005-11-30T01:25:00Z")

</div>

All,

if I have an object defined as follows:

class Fred  
attr\_accessor :fields

```
  def initialize
     @fields = Hash.new
  end

```

end

If want to display the keys in Fred map in a form thus doing  
something  
like

\<%= text\_field( ‘myFred’, ‘(?? WHAT DOES THIS LOOK LIKE ??)’ ) %\>

The issue is what does the databinding expression look like and can’t  
this  
be achieve with Rails ?  
For instance if the hash contains a key ‘name’ that is the field I  
want to  
interact with on the form. This would be the equiv of struts  
dynaforms…

Any ideas ? Rails gods and goddesses, Please help…
