Freeform - get option label & value on submissions page On the form I'm building, I've got a question with radio buttons. And the answers have custom values. e.g.

Q: What is your favorite color?


red (value: 10)
blue (value: 20)
yellow (value: 30) 


On my submissions page, I have the following code

{% for field in submission.fieldMetadata %}
&lt;div class="row"&gt;
    &lt;div class="col-xs-3"&gt;
        &lt;b&gt;{{ field.label }}/b&gt;:
    &lt;/div&gt;
    &lt;div class="col-xs-9"&gt;
        {% set fieldValue = attribute(submission, field.handle).value %}
        {% if fieldValue is iterable %}
        &lt;ul&gt;
            {% for value in FieldValue %}
            &lt;li&gt;{{ value }}&lt;/li&gt;
            {% endfor %}
        &lt;/ul&gt;
        {% else %}
        {{ fieldValue }}
        {% endif %}
    &lt;/div&gt;
&lt;/div&gt;
{% endfor %}


And this returns:

What is your favorite color: 10

I'm using the values to do some funny math - so it's necessary (but unimportant to the issue at hand).

How to do I get the value "red" to show, instead of the 10?

attribute(submission, field.handle).value - shows the selected option's value (10)
attribute(submission, field.handle).label - shows the question (What is your favorite Color?)
attribute(submission, field.handle).handle - shows the question handle (whatIsYourFavoriteColor)

There should be another function to get the option's value, but I can't find what it is.
The code above is correct, but it turns out there was an actual bug in the code if you had a number as the option value.

This affects Freeform 1.5.1 and earlier. The next version (1.5.2) of Freeform will include a fix for this. If anyone needs a patched copy of Freeform before 1.5.2 is available, just contact us via our support form. :)