Quantcast
Channel: Adobe Community : Discussion List - LiveCycle Forms
Viewing all articles
Browse latest Browse all 1160

Affect calculation based on text field value

$
0
0

I have created a text field called PostalCode and applied the appropriate data validation requirements to the field to ensure the user enters it correctly.

 

Elsewhere I have javascript calculations that depend on the postal code that was entered by the user.
All valid postal codes will be split up and stored in 3 different lists.  The calculation will be affected depending on which list the contains the postal code entered by the user.  If the postal code can be found in List1 the rate is 0.05, List2 the rate is 0.07, and List3 the rate is 0.11

 

So how do I essentially say…

 

“and if the postalcode (entered by the user) can be found within List1”?   In other words, List1 contains the postal code.

 

if(GrossFig.rawValue >0 && List1  ______________________________)

{this.rawValue = (GrossFig.rawValue * 0.05;}

 

 

Second question, what’s the best way to create the 3 different lists of postal codes?  I assume I can just create 3 different subforms (hidden from
view) called List1 and List2 and List3.  Any particular way the postal code lists should be set up inside the subforms?  …just text that is comma
separated?


Viewing all articles
Browse latest Browse all 1160

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>