I copied this code from a forum post to disable some textboxes.
I pasted it in the 'Mouse Down' event of a button.
But it doesn't run.
I code, but not in js, so the problem might be glaring, just not to me.
var aExcept = [ "From", "To" ];
for (var i=0; i<this.numFields; i++) {
var name = this.getNthFieldName(i);
if (aExcept.indexOf(name) == -1) {
var f = this.getField(name);
if (f != null) {
f.readOnly = true;
}
}
}
Also, Field format for textbox not working:
I set it to number with "$" for currency, but it accepts anything.
iMac Big Sur
Scribus 1.5.6.1