Forum: Ruby on Rails Adding Form Object dinamically

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Enzo R. (Guest)
on 2008-12-21 12:21
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?
Hassan S. (Guest)
on 2008-12-21 19:07
(Received via mailing list)
On Sun, Dec 21, 2008 at 2:21 AM, Enzo R.
<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
This topic is locked and can not be replied to.