diff --git a/src/pipelines/lstsv2xlsform/toXlsform.ts b/src/pipelines/lstsv2xlsform/toXlsform.ts index 6535a4c..92c1ca4 100644 --- a/src/pipelines/lstsv2xlsform/toXlsform.ts +++ b/src/pipelines/lstsv2xlsform/toXlsform.ts @@ -433,9 +433,12 @@ function collectSelectMultiples( item.lsType === 'M' && !vocabFromCssClass(item.cssclass) ) { + const codes = choicesByName.get(item.name) ?? []; + // LimeSurvey's native "other" (other=Y) is the implicit `other` code, + // which the forward path references as `_other`. out.push({ name: item.name, - codes: choicesByName.get(item.name) ?? [], + codes: item.otherFlag ? [...codes, OTHER_CODE] : codes, }); } }