How to Create Dynamic Form Fields in Rails with Auto-Updates with Hotwire, StimulusJS
Have you ever needed to create dependent fields in a form? Selecting a Country, updates the States select. Or if you select a role (standard/manager/admin) it loads specific fields for the role.
I will share my reusable solution using Ruby on Rails and Hotwire that supports an arbitrary level of “nested dependents”.
Video tutorial: https://youtu.be/TUIR-PYJxlg
Post a comment