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

Check Box being selected from DB

New Here ,
Sep 13, 2024 Sep 13, 2024

Copy link to clipboard

Copied

I have 2 check boxes 100% and another check box that says other with a text field.

 

I have database field called contribution amount.  How can I check the box if the DB value is 100

and when the DB value isnt 100 i want the other check box selected with the contribution amount to appear

 

i tried to do showif contribution !=100 but that didnt work  is there another way i can display it

TOPICS
Modern Acrobat , PDF forms

Views

59

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 14, 2024 Sep 14, 2024

Copy link to clipboard

Copied

LATEST

Use this as custom calculation script of DB field (change field names to your actual field names):

var DB = Number(event.value);
//Check checkbox if value equal 100
this.getField("Check Box1").checkThisBox(0, DB === 100 ? true : false);

//Check 'Other' checkbox if value is not 100 and show amount in field called 'Show Amount'
if(DB && DB !== 100){
 this.getField("Other").checkThisBox(0,true);
 this.getField("Show Amount").value = DB;}
else{
 this.getField("Other").checkThisBox(0,false);
 this.getField("Show Amount").value = "";}

 

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