fix: show free text for 'other' in multi-select

Resolves #104
Should resolve #101
See #75
This commit is contained in:
James Graham
2021-03-21 11:59:29 +00:00
parent 27b16c2212
commit 9f067249de

View File

@@ -62,7 +62,14 @@
}
function setFreeTextState(select, freeTextField) {
if (select.selectedOptions[0].text.toLowerCase().startsWith('other')) {
var other_selected = false;
for (var i = 0; i < select.selectedOptions.length; i++) {
if (select.selectedOptions[i].text.toLowerCase().startsWith('other')) {
other_selected = true;
}
}
if (other_selected) {
freeTextField.show();
} else {
freeTextField.hide();