# Creating dynamically expanding forms

**URL:** <https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699>\
**Category:** Rails\
**Created:** [January 1, 2008, 8:08am UTC](https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699 "2008-01-01T08:08:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f1d935/32.png) [@rex](https://www.ruby-forum.com/u/rex)\
**Post date:** [January 1, 2008, 8:08am UTC](https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699/1 "2008-01-01T08:08:28Z")

</div>

Hello,

I’m learning Rails right now, and as my first project I am trying to  
create a fun little useful website. However, I’m getting stuck on one  
of the steps, and was wondering what the easiest approach would be.  
What I’m specifically looking to do is to create “dynamic” forms,  
where the number of fields can be increased and decreased by the user.  
I’m referring to something like the functionality of phpMyAdmin, where  
the user has the option to keep adding columns to a table. It would be  
something like this: the form starts out with fields to input a street  
address. Then, when the user is finished adding that address, he has  
the option “Enter another address”, and if he clicks on that button, a  
new set of fields is created, and which the a user can fill out the  
new address, until he feels he is finished. This is the same concept  
used on the following site for entering email addresses:

[http://meetwithapproval.com/CreateMeeting.aspx](http://meetwithapproval.com/CreateMeeting.aspx)

What would be the easiest way to do this? I figure it can be done  
server-side or client side; what’s the best way?

Thanks,

Rex

---

<div class="post-metadata">

**Author:** ![rex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f1d935/32.png) [@rex](https://www.ruby-forum.com/u/rex)\
**Post date:** [January 2, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699/2 "2008-01-02T20:38:36Z")

</div>

On Jan 1, 7:07 pm, Rex [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Sorry, I realized the link I entered goes to the wrong page. Please  
> ignore it.
> 
> But does anybody know the best way to create dynamically expanding  
> forms?

Maybe [#75 Complex Forms Part 3 - RailsCasts](http://www.railscasts.com/episodes/75) will help?

Allan

---

<div class="post-metadata">

**Author:** ![rex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f1d935/32.png) [@rex](https://www.ruby-forum.com/u/rex)\
**Post date:** [January 1, 2008, 8:07pm UTC](https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699/3 "2008-01-01T20:07:26Z")

</div>

Sorry, I realized the link I entered goes to the wrong page. Please  
ignore it.

But does anybody know the best way to create dynamically expanding  
forms?

---

<div class="post-metadata">

**Author:** ![rex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f1d935/32.png) [@rex](https://www.ruby-forum.com/u/rex)\
**Post date:** [January 6, 2008, 5:42am UTC](https://www.ruby-forum.com/t/creating-dynamically-expanding-forms/124699/4 "2008-01-06T05:42:36Z")

</div>

Thanks! I’ll have a look at it.
