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

Select minimum of CheckBox in PDF document

New Here ,
Jul 21, 2024 Jul 21, 2024

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

 

TOPICS
PDF forms

Views

485

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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 

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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.  

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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:

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

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

thanks will give it a try 

 

Votes

Translate

Translate

Report

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