Highlighted

Auto Fill

New Here ,
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.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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

Topics

Acrobat SDK and JavaScript, How to, PDF forms

Views

84

Likes

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

Auto Fill

New Here ,
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.

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

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

Topics

Acrobat SDK and JavaScript, How to, PDF forms

Views

85

Likes

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
Most Valuable Participant ,
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?

Likes

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
Reply
Loading...
New Here ,
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.

Likes

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
Reply
Loading...
Most Valuable Participant ,
Jul 10, 2020

Copy link to clipboard

Copied

What is the name of the check-box field?

Likes

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
Reply
Loading...
New Here ,
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.

Likes

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
Reply
Loading...
New Here ,
Jul 10, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Most Valuable Participant ,
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));

Likes

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
Reply
Loading...
New Here ,
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?

Likes

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
Reply
Loading...
Most Valuable Participant ,
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?

Likes

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
Reply
Loading...
New Here ,
Jul 10, 2020

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF