# Forms Generated from Structures

**URL:** <https://www.ruby-forum.com/t/forms-generated-from-structures/92375>\
**Category:** Rails\
**Created:** [April 18, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/forms-generated-from-structures/92375 "2007-04-18T20:03:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [April 18, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/forms-generated-from-structures/92375/1 "2007-04-18T20:03:52Z")

</div>

Greeting All:

I am writing this in hopes of not reinventing the wheel. To me this  
seems like such a good idea that someone else has thought of and  
implemented it already.

Problem.

I am tracking a bunch of user configurable “Things.” Depending on how  
the these Things have a state that is effected by a number of different  
factors including the state of things “around” them. Each thing can be  
configured by the user via a form, but the options on that form will  
change both in kind and allowable value based on the state of the Thing.

Solution.

I didn’t want to have to create HTML forms for all the states of all  
things by hand, so I came up with a data structure that described what  
type of information I needed and what allowable return values were.  
With this structure I could programmatically create HTML forms, and also  
use the same structure to validate the returned values. These  
structures obviously could be manipulated in Ruby like ways (Whatever  
that means). Unfortunately, I’m a hobby programmer and while the  
concept sounded good, the implementation is currently … Um… VERY  
Alpha. (And not easy to use either)

Question.

I realized that this seemed to be a very obvious idea and that there  
would be lots of smart people out there who would have already done all  
the hard work. My question is who are they and where to I find the  
manifestation of their brilliance?

JFMILLER
