{%- if labels %}
<table class="dynamic-row-widget span{{ labels|length }}" 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} %}
        {{ subfield(class="span1", **attrs) }}
      </td>
      {%- endfor %}
    </tr>
    {%- endfor %}
  </tbody>
</table>
{%- endif %}
