{%- if labels %}
<table class="js-widget" data-init-with="dynamicRowWidget" data-prefix="{{ field.name }}">
  <thead>
    {%- for label in labels %}
      <th>{{ label }}</th>
    {%- endfor %}
  </thead>
  <tbody>
    {%- for fieldform in field %}
    <tr>
      {%- for subfield in fieldform if not subfield.is_hidden %}
      <td>
        {%- if loop.first %}
          {%- for subfield in fieldform if subfield.is_hidden %}
            {%- set attrs={'data-short-name': subfield.short_name} %}
            {{ subfield(id=subfield.name, **attrs) }}
          {%- endfor %}
        {%- endif %}
        {%- set attrs={'data-short-name': subfield.short_name, 'class': 'form-control'} %}
        {{ subfield(**attrs) }}
      </td>
      {%- endfor %}
    </tr>
    {%- endfor %}
  </tbody>
</table>
{%- endif %}
