I am trying to do this with lower 0 and upper 21 (22 options), max 10 selected. How do I alter the script for a double-digit maximum? Currently, the script is running as soon as I select one checkbox.
@@pdfform Please see below. Did I do something wrong? function LimitCB(lower, upper, ms) { var cnt = 0; for (var i = lower; i < upper+1; i++) {
if (this.getField("cHob." + i).value !== "Off") cntt; if (cnt > ms) { event.target.value = "Off"; app.alert ("You may only choose one option for this row."+ "/n/n" + "NOTE: You can only select " + ms+ "one option.", 1); break; } } }
Thank you! this video is great!
Thanks so much ❤️
You are amazing
Thank you so much. :)
I am trying to do this with lower 0 and upper 21 (22 options), max 10 selected. How do I alter the script for a double-digit maximum? Currently, the script is running as soon as I select one checkbox.
mssg on our patreon page
i need your help sir.
Im getting a syntax error missing ; before statement 3: at line 4
I wrote it as for (var i = lower; i < upper+1; i++) {
Did I miss something?
@Nati M. if its showing error then there must be some mistakes..... please check ur script thoroughly with video each line
Hello, it is not working for me. Please explain why you copy and pasted LimitCB (0,5,3); what do the 0, 5 and 3 signify?
0 is the first field's suffix, 5 is the last field suffix and 3 is max no. selection
@@pdfform
Please see below. Did I do something wrong?
function LimitCB(lower, upper, ms) {
var cnt = 0;
for (var i = lower; i < upper+1; i++) {
if (this.getField("cHob." + i).value !== "Off") cntt;
if (cnt > ms) {
event.target.value = "Off";
app.alert ("You may only choose one option for this row."+ "/n/n" + "NOTE: You can only select " + ms+ "one option.", 1);
break;
}
}
}
@@amarketing55 fourth line you hve written cntt instead of cnt++
@@pdfform Thank you. So if I have 20 boxes and only want to allow 1 selection instead of 3, would I write LimitCB (0,20,1);
if u want only 1 selection just use Radio buttons... no need to use checboxes