Our great sponsors
-
Cocoon
Dynamic nested forms using jQuery made easy; works with formtastic, simple_form or default forms
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Nested forms are forms that handle nested models and attributes in one form; e.g. a project with its tasks or an invoice with its line items. Before Rails 6, Cocoon is a good choice for creating dynamic nested forms. But Cocoon needs jQuery to work well, it's a very old library on modern-day frontend frameworks. When Stimulus is came out, Rails devs is suggested to use Stimulus as Javascript library in their projects. So, I created a gem for handling dynamic nested forms with Stimulus JS.
View on GitHub
Related posts
- Is there an easy gem or workflow to manage form fields for `has_many`?
- what would be the preferred way of creating a form that isn't bound to a model?
- I'm looking for a solution or strategies for viewing and managing related records in a single view
- What's Rails's answer to Django's formsets?
- Dynamic nested forms with Turbo