{% set custom_metadata_row_context = namespace() %}
{# The variable 'field' is generated by Python in the main_router.py file. #}
{% set custom_metadata_row_context.field = field %}
{% set custom_metadata_row_context.form_object = form_object %}
{% set custom_metadata_row_context.errors = [] %}

<turbo-stream action="append" target="document_{{ form_object.document_mid }}__new_metadata">
  <template>
    {% include "components/form/row/row_with_metadata.jinja" %}
  </template>
</turbo-stream>
