How can I loop through the values of a drop down within a SuperTable? I a musing a front-end form to create an entry in the CP. In my form I am using a SuperTable that contains two fields/blocks.


Size - [text input]
Measurement - [dropdown]


Here is what my template looks like:

&lt;div class="row"&gt;
    &lt;input type="hidden" name="fields[lotSize]"&gt;
    &lt;input type="hidden" name="fields[lotSize][new1][type]" value="1"&gt;

    &lt;div class="col-xs-6"&gt;
        &lt;div class="form-group"&gt;
            &lt;label for="lotSize"&gt;Lot Size&lt;/label&gt;
            &lt;input type="text" class="form-control" name="fields[lotSize][new1][fields][size]"&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="col-xs-6"&gt;
        &lt;label for="measurement"&gt;Measurement&lt;/label&gt;
        &lt;select name="fields[lotSize][new1][fields][measurement]"&gt;
            {# Loop through the values instead of hard-coding #}
            &lt;option value=""&gt;Select&lt;/option&gt;
            &lt;option value="squareFeet"&gt;Square Feet&lt;/option&gt;
            &lt;option value="acres"&gt;Acres&lt;/option&gt;
        &lt;/select&gt;
    &lt;/div&gt;
&lt;/div&gt;


I've been reading through Updating a Super Table field from a front end form and have tried this:

{% set fieldHandle = 'lotSize' %}
{% set field = craft.fields.getFieldByHandle(fieldHandle) %}
{% set blocktype = craft.superTable.getSuperTableBlocks(field.id)[0] %}


...But I'm not sure where to go next to get to the measurement field.

I have attached a screenshot of my CP page to help show what I am trying to accomplish. Thank you for any suggestions!
You'll likely want to do something like this:

{% for fieldtype in blocktype.getFieldLayout.fields %}
    {% set field = fieldtype.field %}

    Handle: {{ field.handle }}

    {% if field.type == 'Dropdown' %}
        {% for option in field.settings.options %}
            Label: {{ option.label }}
            Value: {{ option.value }}
        {% endfor %}
    {% endif %}
{% endfor %}


Essentially, this loops through all the sub-fields in your Super Table field, and for each field, you can make any sort of conditional you like in order to handle each fields content.