How to wrap hidden id input generated by inputs_for?


Maybe someone had a similar issue with inputs_for - it puts a hidden id input just under the input_for function in a template.
Obviously, I want it to be wrapped within the children’ content block, so deleting it will effectively remove id input as well. And if I’m looking at the right place in code it seems that there is no option for that

  = inputs_for f, :social_networks, fn fsn ->
      = render "_social_networks_item_template.html", f: fsn, social_networks: @social_networks


<ul id="social-network-items">
  <input id="newsletter_settings_social_networks_0_id" name="newsletter_settings[social_networks][0][id]" value="24cc2cda-80e3-4531-8ae2-6ce2e35ecd8b" type="hidden">
  <div class="please-put-id-input-here">
    <li> <!-- <- beginning of the "_social_networks_item_template.html"

Has anyone solved it before without javascript?

1 Like