<#if list_responses??> <#list list_responses as response> <#if response.entry.idEntry == entry.idEntry && response.entry.error??> <#assign class = 'has-error' /> <#break> <@formGroup labelFor='attribute${entry.idEntry}' labelKey='${entry.title}' helpKey='${entry.helpMessage!}' mandatory=entry.mandatory class='${class!}'+'${entry.CSSClass!}'> <@select name='attribute${entry.idEntry}' id='attribute${entry.idEntry}'> <@option value='' label='#i18n{appointment.xpage.form.noValue}' /> <#list entry.fields as field> <#if field.code == 'answer_choice'> <#assign isSelected = false /> <#if list_responses??> <#list list_responses as response> <#if response.entry.idEntry == entry.idEntry && response.field??> <#if response.field.idField == field.idField> <#assign isSelected = true /> <#break> <#else> <#if field.defaultValue> <#assign isSelected = true /> <@option value='${field.idField}' selected=isSelected label='${field.title}' title='${field.comment!}' /> <#if list_responses??> <#list list_responses as response> <#if response.entry.idEntry == entry.idEntry && response.entry.error?? && response.entry.error.isDisplayableError> <#assign error = response.entry.error> <#if error.mandatoryError><#assign errorMsg = error.errorMessage><#else><#assign errorMsg = '#i18n{appointment.message.mandatory.entry}'> <@alert color='danger' title=errorMsg />