Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Numerical calculation affected by text value

Bluecanoer
Level 1
Level 1

I have a text field on my livecycle form where the user enters a postal code.

Essentially I have TOTAL (number field) that is determined from a variety of standard number calculations, but the last step is to increase the TOTAL by either 10%, 15% or 25% depending on the postal code entered in the text field (the location of the user).

In some cases the first 3 digits of the postal code are sufficient to determine which rate increase applies.  In other cases the entire 6 digits of the postal code will determine the increase.

I've never had any javascript training, just a complete novice that works with basic if / else javascript and a variety of helpful forum posts.

Since I am essentially separating postal codes into 3 groups, what's the simplest approach to doing this?   The PDF form must remain self contained (no outside links).  Thus far I have used hidden number fields for all rating.

0 Replies