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

claculation discount based on being a member or not radio buttons

$
0
0

to start with i am not a programmer but i can get it fast. i tried to do this formula but it is not working. i wonder why.

the case is when the applicant press a radio button group2 yes or no membership button the total of his subscription will be calculated with a 20% discount if yes or as the original price got from a field called cost.

i used this script:

 

 

var oFldSel = this.getField("Group2");

var oFldSub = this.getField("cost2");

 

if(oFldSel = Yes)

{

     event = oFldSub * 0.2;

}

else if(oFldSel)

{

   switch(oFldSel)

   {

      case "No":

        event = oFldSub;

        break;

      default:

        event = oFldSub;

        break;

   }

}

 

please help i am a step away from finishing this form.


Viewing all articles
Browse latest Browse all 12130

Latest Images

Trending Articles



Latest Images

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