The function to_form (called by polymorphic_embed_inputs_for) is hardcoded to use __type__ as a hidden field. If the embedded schema is configured with a different type_field, the changeset will be invalid. I'm working around this for now by manually adding another hidden field with the correct field name.
The function
to_form
(called bypolymorphic_embed_inputs_for
) is hardcoded to use__type__
as a hidden field. If the embedded schema is configured with a differenttype_field
, the changeset will be invalid. I'm working around this for now by manually adding another hidden field with the correct field name.Hidden field for reference: https://github.com/mathieuprog/polymorphic_embed/blob/78e51d90a55d73a0f81a99de1c28316f057d37b8/lib/polymorphic_embed/html/form.ex#L153