Super, Patrick, that's a great start.  How can I display that value in the
view?

On Thu, Jun 28, 2012 at 4:46 PM, Patrick Crowley <[email protected]>wrote:

> > 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?
>
> 1. Use jQuery.
>
> 2. You can store the next increment number in the dom using data
> attributes.
>
>   $('#increment').data('next', 52);
>
> 3. Read the data attribute after you've written it.
>
>  $('#increment').data('next');
>
> -- Patrick
>
> --
> 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