I am trying to complete a form in acrobat for my company, but this is the first time I have ever used javascript. Using google (and my knowledge of Maths and excel), I have managed to write script for most of the calculations I am performing. However, I am having trouble with the final calculation and would like someone to have a look and help offer me guidance on where I am going wrong.
Overview. My final equation, box z, will look at box A and identify which product has been selected from the drop down list. If the product is Apple, then box z will look at box b. If box b is =<0.7, then box z needs to show ‘overweight’. If box b is =>0.475 but <0.7, then box z needs to say ‘good weight’. If box b says >0.475 then box z needs to say ‘underweight’.
If box A does not say apple, then box z needs to be blank.
I have drafted the following code but it does not work. Any help from anyone?
Expand|Select|Wrap|Line Numbers
- if (this.getField("Box A").value == yes){
- Event.value=(this.getField(“Box B”).value={
- if (this.getField(“Box B”).value == =<0.7) {
- event.value=”overweight”;
- }
- Else if (this.getField(“Box B”).value == (=>0.475) && (=<0.7)) {
- event.value=”good weight”;}
- Else if (this.getField(“Box B”).value == >0.475) {
- event.value=”underweight”;}
- Else if (this.getField("Box A").value == no){
- Event.value=” “{
- Else if (this.getField("Box A").value == ){
- Event.value=” “}