Custom calculation script dependant on dropdown selection

New Here ,
Jan 30, 2020

Copy link to clipboard

Copied

Hi there,

 

I am creating a pricing form for a client. I have a dropdown menu of services to choose from. We then have working calculation fields where they add in their [quantity] x [price] and then it spits out the total in another text box. All is working great.

 

They've asked if I can add in a custom calculation if they select [Digital] from the services list, which then divides the [quantity] by 1000 and then multiplied by the price to calculate their total. Current calculations can stay the same if they choose any other service. 

 

Based on one dropdown item: [Quantity] / 1000 x [Price] = [Total]

 

I'm sure this is doable, but i'm pretty new to scripting in the forms and can't find anything online to know what parts to start with.

 

Any help is much appriciated.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, Edit and convert PDFs, PDF forms

Views

58

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

Custom calculation script dependant on dropdown selection

New Here ,
Jan 30, 2020

Copy link to clipboard

Copied

Hi there,

 

I am creating a pricing form for a client. I have a dropdown menu of services to choose from. We then have working calculation fields where they add in their [quantity] x [price] and then it spits out the total in another text box. All is working great.

 

They've asked if I can add in a custom calculation if they select [Digital] from the services list, which then divides the [quantity] by 1000 and then multiplied by the price to calculate their total. Current calculations can stay the same if they choose any other service. 

 

Based on one dropdown item: [Quantity] / 1000 x [Price] = [Total]

 

I'm sure this is doable, but i'm pretty new to scripting in the forms and can't find anything online to know what parts to start with.

 

Any help is much appriciated.

TOPICS
Acrobat SDK and JavaScript, Create PDFs, Edit and convert PDFs, PDF forms

Views

59

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
Jan 30, 2020 0
Adobe Community Professional ,
Jan 30, 2020

Copy link to clipboard

Copied

Here's an article on Conditional execution. 

https://www.acrobatusers.com/tutorials/conditional-execution/

There is an example file. 

It uses a checkboxes and radio buttons as the condition, but it's pretty much the same for dropdowns. 

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...
Jan 30, 2020 0