Compare combobox text as a condition in another field's calculation.
I'm trying to make a condition, if one of the 15 comboboxes have a certain listed text value selected, then a button will appear.
I tried to follow this example I found here on another question:
var t = document.getElementById("fTerminalType");
var selectedText = t.options[t.selectedIndex].text;
so the part of my code that uses it is:
for (i=1;i<16;i++) {
var t = this.getField("ComboBox"+i);
var s = t.options[t.selectedIndex].text;
if (s=="Specific Text") {
k.display = display.visible;
}
}
So `Combobox1` has "Specific Text" selected, but the `k` button does not display visible , and the rest of the code (a calculation) returns empty.
If I remove the internal code from `for () {}`, the rest of the calculation works, so the syntax error is specific to the text comparison part.
I tried `.value`,`.innerHTML`,`.export.value`,`.change` and `.changeEx` instead of `.text`, nothing worked.
I don't know if pdf forms have jQuery, I could try it but would need further help with the code either way.
Thanks.
