Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Select minimum of CheckBox in PDF document

New Here ,
Jul 21, 2024 Jul 21, 2024

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

 

TOPICS
PDF forms
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2024 Jul 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'.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2024 Jul 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 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2024 Jul 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);}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2024 Jul 21, 2024

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.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2024 Jul 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???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2024 Jul 21, 2024

HI 

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

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2024 Jul 21, 2024

@Farhad36250355635f 

Two ways:

1. Click on All Tools -  Edit a PDF or

2. Edit 

Both will take you to this screen:

mpchow_0-1721592487125.png


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. 

mpchow_1-1721592699734.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2024 Jul 21, 2024
LATEST

thanks will give it a try 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines