Globally replace id placeholders for doubly nested associations

Ran into an issue where we had a doubly nested form, and the placeholder that was set for the child index for the final level of the form wasn't being replaced with the dynamically generated id. This replaces all instances of the placeholder (globally) with the generated value of the id.
did you mean to refer to the `regex` here?