If you wrap the set of fields in a div or span with a class youcan count
the number of elements with that class instead of using a counter var.

-Bradly


On Thu, Jun 28, 2012 at 4:39 PM, Chris McCann <[email protected]> wrote:

> SD Ruby,
>
> I'm struggling with a Javascript issue that I'm hoping one of you gurus
> can help with.
>
> One of my forms has a JS link that adds additional fields to the form for
> a nested form attribute.  There's also a hidden field that should have an
> incrementing number in it that will increment for each additional set of
> nested fields that's added.
>
> I can't sort out how to keep a JS var to hold the "next" increment number
> and to set the hidden field value to that value when the new nested fields
> are added.
>
> Any suggestions?
>
> Thanks,
>
> Chris
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to