<p>The value of dropdown fields are set in the dashboard. How to set the value is dependent on the form plugin or craft field type you are using.</p>

CC BY-SA 4.0
2018-12-18T15:46:41.360Z
2018-12-18T15:46:41.360Z
Chattervast
<p>I currently have this dropdown on a front-end form, the problem I'm having is that it's saving the <code>value</code> where I really want to use the label in my templates such as <code>United Kingdom</code> instead of <code>unitedKingdom</code>. Is this something I should be changing in my Dashboard/Front-end/Dropdown?</p>

<pre><code>        &lt;div class="form-group"&gt;
          &lt;label&gt;Location&lt;/label&gt;
          &lt;select class="form-control" id="listingType" name="fields[location][]" required&gt;
            {% set locationField = craft.fields.getFieldbyHandle('location') %}
            {% for option in locationField.settings.options %}
            &lt;option value="{{ option.value }}"&gt;
              {{ option.label }}
            &lt;/option&gt;
            {% endfor %}
          &lt;/select&gt;
        &lt;/div&gt;
</code></pre>

<p>Front End </p>

<p><code>{{ entry.author.location|ucwords }}</code></p>

CC BY-SA 4.0
2018-12-12T00:35:39.720Z
I don't get the question, you do want to have the label distributed in the frontend template, as you do with .label. You would use the value only for Form submission...as you do as well...I am confused 
HendrikEng
CC BY-SA 4.0
2018-12-12T02:06:23.983Z
It seems he wants the value of the options to be the label. So both the label and value are the same. That would be a change in the dashboard. If you are manually setting all of the options, you should be able to set what the value is.
Chattervast
<templating>
Using Label instead of Value from Dropdown
# Using Label instead of Value from Dropdown

(Asked by: username_0 on 2018-12-12)

I currently have this dropdown on a front-end form, the problem I'm having is that it's saving the value where I really want to use the label in my templates such as United Kingdom instead of unitedKingdom. Is this something I should be changing in my Dashboard/Front-end/Dropdown?
        
          Location
          
            {% set locationField = craft.fields.getFieldbyHandle('location') %}
            {% for option in locationField.settings.options %}
            
              {{ option.label }}
            
            {% endfor %}
          
        

Front End 
{{ entry.author.location|ucwords }}

**Tags:** templating
> **Comments:**
> **username_1**: I don't get the question, you do want to have the label distributed in the frontend template, as you do with .label. You would use the value only for Form submission...as you do as well...I am confused   
> **username_2**: It seems he wants the value of the options to be the label. So both the label and value are the same. That would be a change in the dashboard. If you are manually setting all of the options, you should be able to set what the value is.  

---

## 1 answers

### Answer by username_2 on 2018-12-18. Score: 1

The value of dropdown fields are set in the dashboard. How to set the value is dependent on the form plugin or craft field type you are using.


---

