<#if !entry.onlyDisplayInBack || is_completeness_bo> <#assign hasError = false /> <#assign error = '' /> <#if list_responses??> <#list list_responses as response> <#if response.entry.idEntry == entry.idEntry && response.entry.error?? && response.entry.error.isDisplayableError> <#assign hasError = true /> <#assign error = response.entry.error> <#assign idName = buildEntryName( entry, entry_iteration_number )> <#assign errorMsg><#if hasError><#if error.mandatoryError>#i18n{forms.message.mandatory.entry}<#else>${error.errorMessage} <#assign helpMsg><#if entry.helpMessage?exists&&entry.helpMessage!=''>${entry.helpMessage} <#assign entryClass><#if entry.CSSClass?contains('hidden')>hidden<#elseif entry.CSSClass!=''><#list entry.CSSClass?split(' ') as laClass><#if !laClass?starts_with( 'col-' )> ${laClass!}<#if hasError> is-invalid <@cField> <@cLabel label=entry.title for=idName id='label-${idName}' required=entry.mandatory /> <#if entry.helpMessage?exists&&entry.helpMessage!=''><@cFormHelp label=helpMsg id=idName /> <@cInput type='hidden' name='${idName}' id='${idName}' /> <@chList id='sortable_${entry.idEntry!}_1' class='list-group ${entryClass!}' params='role="listbox" tabindex="0" aria-labelledby="label-${idName}" aria-multiselectable="false"'> <#list entry.fields as field> <#if field.code == 'answer_choice'> <#assign notSelected=true /> <#if list_responses?has_content> <#list list_responses as response> <#if response.entry.idEntry == entry.idEntry && response.field??> <#if response.field.idField == field.idField> <#assign notSelected=false /> <#if notSelected> <@chItem id='field_${field.idField}' class='list-group-item sortable-list ' params='role="option" tabindex="0" data-sortable-id="${field.idField}"'>${field.title} <@chList id='sortable_${entry.idEntry!}_2' class='list-group ${entryClass!}' params='role="listbox" tabindex="0" aria-labelledby="label-${idName}" aria-multiselectable="false"'> <#if list_responses?has_content> <#assign nIdx=0 /> <#list list_responses?sort_by('sortOrder') as response> <#list entry.fields as field> <#if response.field.idField == field.idField> <@chItem id='field_${field.idField}' class='list-group-item sortable-list ${acClass!}' params='role="option" tabindex="0" data-sortable-id="${field.idField}"'>${field.title} <#if hasError><@cFormError label=errorMsg id=idName />