0
Community Beginner
,
/t5/acrobat-discussions/javascript-help/td-p/12015321
May 04, 2021
May 04, 2021
Copy link to clipboard
Copied
Field name: group1, group2
group1 = 200 if group2 is more than zero if not leave blank
How do i write this script please?
TOPICS
JavaScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 ACCEPTED SOLUTION
Community Expert
,
/t5/acrobat-discussions/javascript-help/m-p/12015436#M311523
May 04, 2021
May 04, 2021
Copy link to clipboard
Copied
As validation script of "group2" field use this code:
this.getField("group1").value = event.value > 0 ? 200 : "";
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/acrobat-discussions/javascript-help/m-p/12015436#M311523
May 04, 2021
May 04, 2021
Copy link to clipboard
Copied
As validation script of "group2" field use this code:
this.getField("group1").value = event.value > 0 ? 200 : "";
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-discussions/javascript-help/m-p/12015708#M311547
May 05, 2021
May 05, 2021
Copy link to clipboard
Copied
A general tip: For calculations it's better to use the Calculate event of the target field, unless there's a good reason not to do so.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

