Save 36% for Black Friday! Learn more

All threads / Values from dynamic form inputs for use as headings/populate other inputs

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Values from dynamic form inputs for use as headings/populate other inputs

Tim Dowling asked in Javascript

I have a dynamic form im using to create 'sections' within a checklist with one field of 'title' - this also dynamically creates new tabs. I then want to use that input to re name the title of the tab and tab panel. I'm using data-targets and a stimulus controller to do this and it works beautifully, if I only create one section, but any more than one section and it doesn't rename anything. Is there something I can use to pass a unique identifier with the dynamic inputs to use elsewhere?

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 39,609+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.