Skip to main content
Participant
June 2, 2023
Answered

Radio Button Calulcation java script

  • June 2, 2023
  • 1 reply
  • 964 views

I have a form that has radio buttons that I would like a field to be calculated basised on what radio button is sleected.  IE radio button 1 would be x time 1, radio button 2 would be x times 2, radio button 3 would be x time 3.  

 

Thanks in advance for any help this community can provide. 

 

 

This topic has been closed for replies.
Correct answer Nesa Nurani

With little changing, you can use simplified field notation.

When you say "Radio butons named, 1k, 2k, 3k, 4k, 5k" those are radio button choices?

Change those choices to 1000,2000,3000...etc then in the field where you want to show result go to 'Calculate' tab and under 'Simplified field notations' enter:  FM1\ MB*12

 

1 reply

Nesa Nurani
Community Expert
Community Expert
June 2, 2023

Are those radio buttons part of the group?

What are the names of the fields that are used in calculation?

Participant
June 2, 2023

I have one group named FM1 MB with Radio butons named, 1k, 2k, 3k, 4k, 5k, .  The formuala in the calculated field would be if.  (1k is slected then 1,000X12 or 12,000), if 2k is slected 2,000x12 or 24,000 etc.   

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
June 2, 2023

With little changing, you can use simplified field notation.

When you say "Radio butons named, 1k, 2k, 3k, 4k, 5k" those are radio button choices?

Change those choices to 1000,2000,3000...etc then in the field where you want to show result go to 'Calculate' tab and under 'Simplified field notations' enter:  FM1\ MB*12