Using Radio Button Selections to Calculate Bonus
I've been tasked to create a simple form to help sales reps in our company calculate their bonus. I am a creative person, but not a coding/technical person, so I have this cool idea in my head but I don't know how to make it work. I've scoured the internet and forums and have found some helpful threads but can't seem to find what I'm looking for. So here's what I'm trying to do:
Our sales reps have 4 targets that they need to hit (ex./ "category 1," "category 2," etc...) Depending on how many of those targets they achieve, their bonus can increase.
- Example:/ If a sales rep sells 10 units and only hits 1 target category, then their sales are multiplied by $10. If another sales rep also sells 10 units, but hits 2 target categories, then their sales are multiplied by $20. 3 targets = multiply by $30, and all 4 targets = multiply by $40.
The way my form is set up is I have a field for the quantity of units sold, where they simply input a number. I then have 4 groups of (yes/no) radio buttons for them to select whether or not they hit their target in each category. Depending on the number of 'yes' selections will determine what number to multiply the total units sold by.
I don't know if it's easier to use if/else statements or maybe it would be easier to sum the number of 'yes' selections and then determine what to multiply by?
I hope this makes sense, and any help is greatly appreciated! Thank you!
