'gravityform get the "key" instead of "value" of a multiple checkbox submitted form?

I try to explain my problem. Fast question is at the bottom, here I'm just explaining the more detailed I can

I have a gravity form with some questions, 2 of these are multiple choice checkboxes. I'm assigning a numeric value to each of the answer, for example:

by default the choices are

  • first choice
  • second choice
  • third choice

if I check the "show values" option, by default the value is the same as the key, so basically "first choice" = "first choice" and so on.

I want to assign different scores to each choice: For example:

  • first choice = 1
  • second choice = 1
  • third choice = 2

to be able to sum them up I'll set up an hidden numeric field with calculation enabled and sum the results based on what they checked, using merge tags Let's suppose the above example is a field with id 25, I would do something like this to get the sum of those numeric values

{:25.1} + {:25.2} + {:25.3}

this is perfect because like this the hidden field will populate accordingly, and I will be able to see the total score on the admin-side... but at the same time I will not be able to see the answers they've chosen, because they will be numbers (corrisponding to the values I assigned before) and since most of them have the same value I'll not be able to know which answers were selected.. So the output on the admin side would be something like:

For example: //this is the name of the question

  • 1
  • 1
  • 2

Long story short: I need to find a way to display on the admin side the chosen answers by their keys, and not by their values.. (while being able to perform a calculation with some scores I assigned) Any suggestion?

Thanks,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source