<div data-ng-repeat="(rowIndex, row) in ::fields | groupBy:'y' | orderBy:minY" class="fieldsRow row">
  <div data-ng-repeat="field in row | orderBy:'x'">
    <div data-ng-controller="SubmissionFieldCtrl" data-ng-init="fieldId = getFieldId($parent.fieldId, rowIndex - 1, $index)" data-ng-class="getClass(field, row.length)">
      <div id="{{fieldId}}" class="panel panel-default">
        <div class="panel-heading">
          <label>
            <span class="fieldLabel">{{::field.label}}</span>
            <a href="" data-ng-show="::field.hint" data-content="::field.hint" popover="{{::field.hint}}" popover-placement="right" popover-trigger="mouseenter">
              <i class="glyphicon glyphicon-question-sign"></i>
            </a>
          </label>
          <span class="text-red"
                data-ng-if="::field.required"
                popover="{{'This field is mandatory' | translate}}"
                popover-placement="right"
                popover-trigger="mouseenter">*</span>
        </div>
        <div class="panel-body">
          <div class="FieldDescription">{{::field.description}}</div>
          <div class="submissionFieldInput form-group">
            <div data-ng-include="'views/submission/form_field_inputs.html'"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div data-ng-init="fieldRow=$index" data-ng-repeat="row in fields | groupBy:'y' | orderBy:minY" class="fieldsRow row">
  <div data-ng-init="fieldCol=$index" data-ng-repeat="field in row | orderBy:'x'">
    <div data-ng-controller="SubmissionFieldCtrl" data-ng-init="fieldId = getFieldId($parent.fieldId, fieldRow, fieldCol)" data-ng-class="getClass(field, row.length)">
      <div id="{{fieldId}}" class="panel panel-default">
        <div class="panel-heading">
          <label>
            <span class="fieldLabel">{{::field.label}}</span>
            <a href="" data-ng-show="::field.hint" data-content="::field.hint" popover="{{::field.hint}}" popover-placement="right" popover-trigger="mouseenter">
              <i class="glyphicon glyphicon-question-sign"></i>
            </a>
          </label>
          <span class="text-red"
                data-ng-if="::field.required"
                popover="{{'This field is mandatory' | translate}}"
                popover-placement="right"
                popover-trigger="mouseenter">*</span>
        </div>
        <div class="panel-body">
          <div class="FieldDescription">{{::field.description}}</div>
          <div class="submissionFieldInput form-group">
            <div data-ng-include="'views/submission/form_field_inputs.html'"></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Fix HTML id generation for fields on submission questionnaire
Fix HTML id generation for fields on submission questionnaire
