Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 85594

Re: custom calculation

$
0
0

I agree that list-boxes are horrible for this form.

 

You need a loop to verify that a choice was made at every question.  So you create an array holding every fields you need to check the value of

 

var aFields = new Array("field 1", "field 2", etc);

var aDefault = new Array();

for (var i = 0; i < aFields.length; i++){

     if (this.getField(aFields[i]).value == this.getField(aFields[i]).defaultValue){  //compares field value to default value which is empty

          aDefault.push(aFields[i]);  //this will create an array of fields not filled in

     }

}

 

//verify if aDefault contains at least one field

if (aDefault.length > 0){

     event.target.display = display.hidden;  //hide my value if a field is still empty

}

else{

     event.target.display = display.visible;

}


Viewing all articles
Browse latest Browse all 85594

Trending Articles



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