3 Replies Latest reply on Jun 21, 2014 6:51 PM by MichaelN

    Combo box with multiple variables pre populating multiple fields and max value validation script help


      I am creating a pdf form that will be used as a calculator, and my javascript knowledge is pretty rudimentary. I can do the simple things, some of what I need to do is over my head.


      1. I believe I need to use a combo box to pre populate certain fields. I have 13 variables in the dropdown to choose from, and whatever the client chooses will pre populate three other fields (and each of the 13 variables will populate those three fields differently). I'm not exactly sure how to go about doing this. Is it custom keystroke script or does it require a document script? Also, I'm guessing that whatever script will be a series of if/then statements, correct?


      2. Once all the fields have been populated (be it pre population or filled in by the customer), I need to calculate the answer which is not my main problem—I already have the proper calculations in place and they work. The problem is that the answer has a maximum value even if the actual value goes over that max number. So, the actual answer is 14 but the max value can only be 12. How do I get the calculation to replace that actual number (14) with the max number (12)? Is that in the validation tab or should that go elsewhere?


      I feel like I know just enough to be dangerous but not terribly effective. Any help is appreciated.