There have been several excellent blog posts and wiki pages about designing useful Models and RESTful controllers, but there seems to be very little about how to create DRY and elegant view code, particularly where custom forms are concerned.
By this do you mean non-model based forms?
For model based forms, and model-combos, you should look into form_for and fields_for helper methods. These allow you to use a block to describe your form and expand out the various field level helpers (which sets the field names automatically from the model.)
Re: dynamically generating forms, I have written a class (Inherits from Hash actually) that I could use to describe form data, but I've gotten stuck trying use this data to build a form, and decided that there must be someone who had done a better job. Part of my reason for posting was in hope of finding a replacement. Again, I keep running into XForms when I look, but I'm not sure what they are or how they work.
You should look into subclassing FormBuilder that you can use with form_for in your views.
The best reference/guide for this is the Agile Web Development With Rails, 2E IMO.
HTH, Ed