# Drag and drop for a form

**URL:** <https://www.ruby-forum.com/t/drag-and-drop-for-a-form/159492>\
**Category:** Rails\
**Created:** [February 5, 2009, 2:33am UTC](https://www.ruby-forum.com/t/drag-and-drop-for-a-form/159492 "2009-02-05T02:33:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdaddy71](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bbe5ce/32.png) [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Post date:** [February 5, 2009, 2:33am UTC](https://www.ruby-forum.com/t/drag-and-drop-for-a-form/159492/1 "2009-02-05T02:33:36Z")

</div>

I am trying to do a drag and drop cards into a shelf. I am doing this  
for the drop:

\<%= drop\_receiving\_element :slot2,{:onDrop =\> “function(element) {  
$(‘slot2’).replace(’\<td id=“slot2”\>’ + element.id + ‘\</  
td\>’).addClassName(‘cardfill’); }”} %\>

This does not seem to be working. When I press submit, the id is not  
being sent. Does anyone know how to get something like this to work?
