Thanks, Ignacio. I appreciate your help. This code was a mess, and i significantly rewrote it, with the key change being exactly what you suggest: removing the nested forms.
It is all working well now. On Friday, May 8, 2015 at 5:23:08 PM UTC+7, Ignacio Huerta wrote: > > Hi Paul! > > I'm unsure which first element you are, the first response rendered on > the page or the first attachment rendered on each response. > > Unfortunately, your pastie link with the HTML doesn't seem to work at > the moment. > > Without testing it myself, I think the problem might be a double form > issue: > > <form with= '&response'> > <table with= '&this.response_attachments' .... > <delete-button > > delete-button is creating a form inside of an existing form. And I think > this can have unexpected results. > > Why do you need that "form with= '&response'"? Can you remove it? > > Warm regards, > Ignacio > > El 03-05-2015 a las 15:39, [email protected] <javascript:> escribió: > > I have some dryml that manages response_attachments that belong_to > > responses. The first form shows the current response_attachments in a > > table, each with a delete-button. The second form is used to add a > > response_attachment to the relation, and updates the table. > > > > Here is the dryml code: > > > > http://pastie.org/10126600 > > > > This works mostly well, but there is a problem with the code generated > > for the first element: it links to the responses controller, not the > > response_attachments controller, the the delete button errors out. It > > seems to do this because the first button does not get wrapped in a > > form, but later ones do. > > > > Here is the HTML generated, for the first, inoperative row, starting on > > line 3, and for the later, correct rows, starting on line 19. > > > > http://pastie.org/10126635 > > > > If I add a new response_attachment to the relation using the second form > > without reloading the page, the new ajax-inserted delete button gets the > > form operates correctly. If I delete a response_attachment other than > > the first, the ajax-inserted top button also operates correctly. > > > > I have tried replacing the table with a collection with similar content, > > with the same results: the first delete button does not work, and the > > delete buttons other than the first are fine. > > > > I have a feeling there is a way to simplify and combine these two forms, > > but I will take any operable solution. > > > > Thanks so much! > > > > Paul Davis > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Hobo Users" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [email protected] <javascript:> > > <mailto:[email protected] <javascript:>>. > > To post to this group, send email to [email protected] > <javascript:> > > <mailto:[email protected] <javascript:>>. > > Visit this group at http://groups.google.com/group/hobousers. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/d/optout.
