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

Mandary field for check boxes

New Here ,
Aug 31, 2020 Aug 31, 2020

Copy link to clipboard

Copied

Hi! I am creating a form with several mandatory check boxes and after ticking all these checked box (say, 6 boxes), a "confirmation check box" at the bottom can be clicked. 

If the anyone of the 6 boxes not clicked, the "confirmation check box" cannot be clicked.

 

Can anyone help me on that?  Thanks!

 

 

TOPICS
PDF forms

Views

192

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 ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

Hi, you can do it like this:

1. Create TextField (make it hidden if you don't want to show it on your page)

2. Put this code in TextField "Custom Calculation Script"

 

if (this.getField("CheckBox1").value != "Off" &&
this.getField("CheckBox2").value != "Off" &&
this.getField("CheckBox3").value != "Off" &&
this.getField("CheckBox4").value != "Off" &&
this.getField("CheckBox5").value != "Off" &&
this.getField("CheckBox6").value != "Off") {
this.getField("ConfirmationCheckBox").readonly = false ;
} else {
this.getField("ConfirmationCheckBox").readonly = true ;
}

Also rename field names if needed.

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 ,
Sep 01, 2020 Sep 01, 2020

Copy link to clipboard

Copied

LATEST

I would also add a command to reset the confirmation check-box field when it is set as read-only, in case the user ticks it and then goes back and un-ticks one of the other boxes.

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