Copy link to clipboard
Copied
Good Day
I have 24 checkboxes on a PDF document. I would like the end user to select at least one CheckBox before saving document. I do not have a submit button built into the form I prefer users saving the PDF file.
Thanks
Regards
Copy link to clipboard
Copied
If none of the checkboxes are checked, you can use a script to alert a user to check the checkbox when they try to save (it will not stop them to save).
You can place the script as document action 'Document Will Save'.
Copy link to clipboard
Copied
Hi Nesa
Appreciate your respond. Exuse my limitations on scripting, have no idea what the script should be, some guidance and assistance is appreciated, thanks
Copy link to clipboard
Copied
It would be easier if you share your field names, but let's say they are named "Check Box1" to "Check Box24", you can use this script:
var total = 0;
for( var i=1; i<=24; i++){
var f = this.getField("Check Box"+i).valueAsString;
if(f !== "Off")total++;}
if(total == 0){
app.alert("Please selecte at least one of the chekboxes.",3);}
Copy link to clipboard
Copied
Hi Nesa
Do I insert this code for every checkbox? I tried for CheckBox1. The moment I click on the checkbox it prompt me to save the file. If I uncheck the the box it sti allows me to save the file.
Copy link to clipboard
Copied
Or you can add a line of text 'Please select at least one CheckBox' ... I know they can still save without checking...maybe, some of them would just take the hint???
Copy link to clipboard
Copied
HI
I agree with the hint, if can you please advise where do I add the "Line of Text"
Thanks
Copy link to clipboard
Copied
@Farhad36250355635f
Two ways:
1. Click on All Tools - Edit a PDF or
2. Edit
Both will take you to this screen:
or in the tool bar is a Text Tool: Select that and enter text. To make it bigger, click on the "A" a few times to make it bigger, the smaller 'A' to make it smaller.
Copy link to clipboard
Copied
thanks will give it a try