Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Radio Buttons How do I make each one calculate a percentage?

Avatar

Level 1

I have 3 radio buttons, who each relate to a seperate entity. I would like to know, if possible, If I click on radio button A can I wirte a code for it to automatically populate numerical field A with the tax associated (12%) with the total of numerical field X? Can the same be done for the two other radio buttons?

I'm a novice live cycler and am at my wits end with this request. Any help is greatly appreciated!

3 Replies

Avatar

Level 8

1) Select your radio button group (not an individual radio button but the parent that all 3 of your radio buttons belong to)

2) Under the Bindings tab in the Object palette, make sure Specify Item Values is selected.

3) You should see all your radio buttons with their respective values. Change the values to what you want (ie the radio button that belongs to 12% you can put 1.12 next to)

4) In the calculate event of your NumericalFieldA write the following code in FormCalc: NumericFieldX*RadioButtonList (substitute for the names of your fields of course)

That should do it!

Hope it goes smoothly.

Kyle

Avatar

Level 1

Thank you for the reply! I don't think I worded my question properly.

I would like the radio buttons or drop down list (whatever works) to work as follows.

If the user were to press button A then the sum from Numerical field X and the sales tax 12% would calculate in Numerical Field Z

My dilemma is that I can make them sum up correctly, but all three not the individuals. I want only one sum to show up when pressed and the others be hidden. Is there a script for that?

Avatar

Level 8

Hmmm, I don't think I follow. What do you mean by all three sum up, not the individuals? I see 4 fields: A set of radio buttons, a numeric field (X), a sales tax field and a total field (Z).

Kyle