Oh boy. Do I feel stupid. That was it. I can't believe I didn't think
to check that. Thanks for pointing it out though. All fixed now. :)

On Sep 29, 11:52 am, "Charlie Griefer" <[EMAIL PROTECTED]>
wrote:
> On Sun, Sep 28, 2008 at 6:37 PM, nedlud <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
>
> > I have a form that is generated client side with JS. The user can add
> > and delete rows to the form. When users delete rows, I renumber each
> > row, and the 5 fields in each row, so that there are no gaps. For
> > example, if I add three rows, I get rows 1, 2 and 3. If I then delete
> > the 2nd row (2), I want the remaining rows to be numbered 1 and 2 (NOT
> > 1 and 3).
>
> > Client side, this seems to be working fine. Using firebug, and can
> > inspect the elements and I can see that the ID's are all correct.
>
> > But when I submit the form, I shove all the fields in #form# into a
> > session, and when I i cfdump the session, it has stored the row ID's
> > as row 1 and 3 (from the above example. NOT rows 1 and 2 as I expect).
>
> > It's passing the right *number* of fields, but the ID's are wrong,
> > even though firebug showed them to be correct prior to submitting the
> > form.
>
> > This is driving me nuts. Can anyone suggest a reason for this? Or an
> > alternative to my approach?
>
> CF references form fields by the form field "name" attribute.  NOT the "id"
> attribute.
> modify your JS to manipulate the name attributes as well as the ID
> attributes and you should get the desired result.
>
> --
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to