# Adding Form Object dinamically

**URL:** <https://www.ruby-forum.com/t/adding-form-object-dinamically/156137>\
**Category:** Rails\
**Created:** [December 21, 2008, 11:21am UTC](https://www.ruby-forum.com/t/adding-form-object-dinamically/156137 "2008-12-21T11:21:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@enzor](https://www.ruby-forum.com/u/enzor)\
**Post date:** [December 21, 2008, 11:21am UTC](https://www.ruby-forum.com/t/adding-form-object-dinamically/156137/1 "2008-12-21T11:21:25Z")

</div>

I just have the need to add objects in a form in a dinamic way.  
i just give an example:

i have a dropdown box and a text field, and the final user have to add  
as many copies as they wants of this dropdowbn box and text fields  
below.  
the results will be emailed to x other users

how can i handle this situation?

---

<div class="post-metadata">

**Author:** ![enzor](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbe5ce/32.png) [@enzor](https://www.ruby-forum.com/u/enzor)\
**Post date:** [December 21, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/adding-form-object-dinamically/156137/2 "2008-12-21T18:07:52Z")

</div>

On Sun, Dec 21, 2008 at 2:21 AM, Enzo R.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just have the need to add objects in a form in a dinamic way.

If by “dinamic” (sic) you mean without a page refresh, you’ll need to  
use JavaScript.

I’d think any decent JS tutorial would cover creating elements and  
adding them to the page’s DOM.

Or are you saying you currently have some code that’s failing?

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid
