Java Script for Shipping Rates using Acrobat 9 Standard

New Here ,
Apr 26, 2018 Apr 26, 2018

Copy link to clipboard

Copied

I am trying to create a java script to auto populate a shipping rate when using Forms. I am very new to js, and just trying to improve some forms for work and make them fill-able on our website.

If its possible, and someone out in Adobeland could help write I would greatly appreciate it. What I would like is for the "Merch total" field to auto-fill my "Shipping and handling" field. Our shipping rates are as follow:

$0.00 to $39.99$10
$40.00 to $74.99

$12

$75.00 to $99.99$15
$100.00 to $199.99$17
$200 and up$20

Thanks in advance!

-B

TOPICS
Acrobat SDK and JavaScript, Windows

Views

76

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
community guidelines

correct answers 1 Correct Answer

Most Valuable Participant , Apr 26, 2018 Apr 26, 2018
You can use this code as the custom calculation script of the S&H field:var total = Number(this.getField("Merch total").valueAsString);if (total<40) event.value = 10;else if (total<75) event.value = 12;else if (total<100) event.value = 15;else if (total<200) event.value = 17;else event.value = 20;

Likes

Translate

Translate
Most Valuable Participant ,
Apr 26, 2018 Apr 26, 2018

Copy link to clipboard

Copied

LATEST

You can use this code as the custom calculation script of the S&H field:

var total = Number(this.getField("Merch total").valueAsString);

if (total<40) event.value = 10;

else if (total<75) event.value = 12;

else if (total<100) event.value = 15;

else if (total<200) event.value = 17;

else event.value = 20;

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
community guidelines