Creating dynamic fields

Hi,

Here’s the situation: I have a model with various fields, we’ll call
them f1, f2, f3, and f4. I’m trying to create a view that would allow
the end user to fill in the forms for all fields and also optionally
fill in multiple f4 forms. This would look something like gmail’s “add
another attachment” button.

Suppose the user fills in two f4s (call them f4i, and f4ii). The
program will then create two objects with the following form
information:
object1: f1,f2,f3,f4i
object2: f1,f2,f3,f4ii

I hope this makes sense. As of now, I haven’t even been able to create
a view that will allow the user to press a button and create a new form
on the page. I tried using link_to_function(new Insertion.After(‘foo’,
‘bar’)) but quickly hit a problem. If the f4 form is a dynamically
created select (for example) then you can’t really put it in place of
‘bar’.

I would really appreciate any input on this. Thanks!

-r