Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

help with custom calculation/check boxes

$
0
0

Hi.

 

I'm trying to tie checkboxes to an aggregate point total as follows:

 

Question1 []Yes []No

Question2 []Yes []No

1 point if either "Yes" is selected. (Max of 1 point only)

 

Question3 []Yes []No

Question4 []Yes []No

2 points total for each "Yes". (Max of 4 points)

 

I've set each checkbox to an export value of 1.

I have a tally box "box2"

 

// first section questions// set vars
var points = this.getField("YesOne").value + this.getField("YesTwo").value;// if thenif ((points > 0)) {this.getField("box2").value = 1}else{this.getField("box2").value = 0};

 

I've gotten stuck on the first part, as It's not working as I stated above, any help would be appreciated.

 

I'm trying to post the actual PDF, but I can't find a way to put it into this posting...

 

thanks!


Viewing all articles
Browse latest Browse all 12130

Trending Articles



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