Skip to main content
Participant
July 21, 2024
Question

Select minimum of CheckBox in PDF document

  • July 21, 2024
  • 2 replies
  • 968 views

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

 

This topic has been closed for replies.

2 replies

creative explorer
Community Expert
Community Expert
July 21, 2024

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???

m
Participant
July 21, 2024

HI 

 I agree with the hint,  if can you please advise where do  I add the  "Line of Text" 

Thanks

Participant
July 21, 2024

@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. 

 


thanks will give it a try 

 

Nesa Nurani
Community Expert
Community Expert
July 21, 2024

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'.

Participant
July 21, 2024

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 

Nesa Nurani
Community Expert
Community Expert
July 21, 2024

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);}