polymorphic_embed icon indicating copy to clipboard operation
polymorphic_embed copied to clipboard

Make it clear that the `phoenix_html_helpers` library is needed to use `polymorphic_embed_inputs_for`

Open cheerfulstoic opened this issue 6 months ago • 2 comments

cheerfulstoic avatar Jun 30 '25 12:06 cheerfulstoic

Out of curiosity, why is phoenix_html_helpers necessary? Would it be possible to fix this library such that it doesn't depend on phoenix_html_helpers?

Munksgaard avatar Jul 02 '25 20:07 Munksgaard

It seems that phoenix_html_helpers is only used to generate hidden input fields inside polymorphic_embed_inputs_for/3 and polymorphic_embed_inputs_for/4.

From quickly looking at the code in phoenix_html_helpers it's basically just about generating hidden input field tags.

So I would guess, inlining that piece of code could make it just work without that dependency?

rmoorman avatar Oct 10 '25 08:10 rmoorman