# Submitting wrong ajax form

**URL:** <https://www.ruby-forum.com/t/submitting-wrong-ajax-form/90081>\
**Category:** Rails\
**Created:** [March 25, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/submitting-wrong-ajax-form/90081 "2007-03-25T21:58:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_old](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9f8e36/32.png) [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Post date:** [March 25, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/submitting-wrong-ajax-form/90081/1 "2007-03-25T21:58:10Z")

</div>

Hey,

I am having a strange issue in Ruby on Rails, on a page set up like  
the following:

[Form to add an item - when added, rails re-renders list below me]

[Item 1 [edit/delete]]

[Item 2 [edit/delete]]

When they click edit, it loads a form for them to edit the item within  
the same

. The adding works, and a new item is made in the list  
below. Now the problem is that when I click to edit item 1, it will  
load the form correctly, and when I submit the button “Update Item”,  
it appears to call the add function because it highlights the items  
(which the add function does) and rerenders the list, whereas  
according to my form\_remote\_tag, it should just re-render that  
specific item 
.

I have triple-checked all of my forms, and they are all closed off,  
and the edit form definitely calls “edit”, not “create”.

The edit function works if I disable the add item partial on the  
page.

Any ideas why the forms would be overlapping?

Thanks,  
John
