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

Auto Fill

New Here ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

I am creating a form and I want it to check a box of met or unmet depending on a text field entry. So if the text field is less than 5% I want the box of unmet to be checked. Any idea how I can make that happen.

TOPICS
Acrobat SDK and JavaScript

Views

466

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

correct answers 1 Correct answer

Community Expert , Jul 10, 2020 Jul 10, 2020

Use this code as the custom validation script of the percentage field:

 

this.getField("Criterion3Met").checkThisBox(0, (Number(event.value)>=5));
this.getField("Criterion3Unmet").checkThisBox(0, (Number(event.value)<5));

Votes

Translate

Translate
Community Expert ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

What are the names of the fields? Is the text field set to the Percentage format option, or to Number, or to None?

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

The field is set as a number text field and the field I want it to fill is just a check box.

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

What is the name of the check-box field?

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

The check boxes are Criterion3Met and Criterion3Unmet. The percentage field is named percentage. If it is less than 5% it will need to check Criterion3Unmet and if it is greater than 5% it will need to check Criterion3Met.

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

Sorry should be greater than or equal to 5% for the Criterion3Met.

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

Use this code as the custom validation script of the percentage field:

 

this.getField("Criterion3Met").checkThisBox(0, (Number(event.value)>=5));
this.getField("Criterion3Unmet").checkThisBox(0, (Number(event.value)<5));

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

That worked amazing thank you so much!! One more question...If I have a all fields named the same such as counselorrow1 it fills all the other fields perfectly but I want to lock all the other fields once they populate the names is this possible?

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

Sorry, I don't follow... You want to lock a field once it has a value? What if the user wants to change it?

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 10, 2020 Jul 10, 2020

Copy link to clipboard

Copied

LATEST

I only want the boxes locked that auto fill from the first one filled in. So on page one they enter a name into the counselorrow1 box it fills through all of the pages then I want it to lock the other pages from being able to edit that field but they can still edit the field on page one.

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