Boolean values need to be entered as either “true” or “false”.
However, both “true” and “false” are evaluated as true. Interestingly, a blank value is evaluated as false.
Working:
Not Working:
Designer Template Parameters:
Control Script:
var section = merge.template.contexts.PRINT.sections['FAQs'];
if (!section) {
throw "'FAQs' not found";
}
section.enabled = !merge.template.parameters.LetterOnly;
It appears there might be a discrepency between documentation and the actual behavior. It looks as though the underlying code uses “false” as a string and not as a boolean value. Which leads to this confusing behavior, because in JavaScript var bool = “false” is truthy because the string isn’t empty.
I will open a case internally so that the documentation is updated. In the mean time, please use an empty string for “false”. I understand that this is confusing for people who might not be fluent in JavaScript (and even then…), but changing the behavior of the software might lead to backward compatibility issues.