stimulus-library icon indicating copy to clipboard operation
stimulus-library copied to clipboard

nested-form-controller within nested-form-controller

Open gap777 opened this issue 3 weeks ago • 1 comments

Your nested form controller suggests that one can be used within another. From https://sub-xaero.github.io/stimulus-library/docs/controllers/form/NestedFormController#how-to-use,

If you want to use multiple levels of nested forms ....

I have a form with 2 nested resources: form has N creative_variations, and each creative_variation has M assets.

This could work, but the NEW_RECORD symbol needs to be different between the two instances.

In the creative_variation template, I might use NEW_VARIATION and within the asset template, I might use NEW_ASSET. Each stimulus controller would be configured with the correct new record placeholder.

But maybe you've found another way to do this?

Thanks for your help.

gap777 avatar Dec 11 '25 02:12 gap777