Rails - Hotwire

26 May 25

Implemented this dynamic form shown on Medium on /experimentation/experiment  /users/new.
The concept is to create a versatile form by wrapping a section in a turbo-frame and connecting a dropdown (language option here) to a stimulus controller. The stimulus controller gathers the information in the form and fires it off in a Turbo request to the controller, which responds with an updated view that is used to update the turbo-framed section.
So the form's logic is all handled server-side, but the combination of Stimulus and Turbo make it very quick and smooth.