<p>Just to make sure I am on the same page, you have a select field within the control panel that is populated with the prefix/title(s)?</p>

<p>If that's the case, within your registration form, you could do something like this. Not tested, but should be close...</p>

<pre><code>{% set options = craft.fields.getFieldByHandle('yourFieldHandle').getFieldType.options %}

{% if options|length %}
    &lt;label for="prefix"&gt;Prefix&lt;/label&gt;
    &lt;select id="prefix" name="fields[prefix]"&gt;
        {% for option in options %}
            &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
        {% endfor %}
    &lt;/select&gt;
{% endif %}
</code></pre>

<p><strong>EDIT</strong></p>

<p>Good catch by @Benjammin'. You will need the <code>options</code> part to actually access the values. I've updated my answer, give it another try.</p>

CC BY-SA 3.0
2016-01-22T15:54:19.477Z
That didn't seem to do the trick. Was returning a template error.
JackO
CC BY-SA 3.0
2016-01-22T16:20:53.713Z
Code looks legit. What was the error?
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2016-01-22T23:31:44.520Z
The `options` variable is getting the `FieldModel`, not the list of options. To get the list of options you need to access `.settings.options` on the field model.
Ben Fleming
CC BY-SA 3.0
2016-01-22T14:38:55.313Z
2016-01-29T15:11:26.440Z
2016-01-29T15:11:26.440Z
Damon
<p>I want users to be able select their own name prefix/title (Mr, Mrs, Dr. etc) as part of front end form that allows them to update their user details.</p>

<p>I have created a custom dropdown field and populated this with the titles that users can select. However, I'm having trouble displaying the dropdown on the front end form that allows users to select one option.</p>

<p>Any guidance on how I would go about achieving this would be helpful!</p>

<hr>

<p><strong>EDIT</strong></p>

<p>This is what I had initially. However, this just prints each option as a separate select? </p>

<pre><code>{% set dropdownField = craft.fields.getFieldbyHandle('honorific') %}

{% for option in dropdownField.settings.options %}
    &lt;select id="honorific" name="honorific"&gt;
        &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
    &lt;/select&gt;
{% endfor %}
</code></pre>

CC BY-SA 3.0
2016-01-22T23:28:56.597Z
Your `<select>` tags are inside the `for` loop. Move them outside the loop and you'll be golden!
Ben Fleming
<form><frontend><custom-field>
Allow a dropdown custom field to be edit from a front end form
# Allow a dropdown custom field to be edit from a front end form

(Asked by: username_0 on 2016-01-22)

I want users to be able select their own name prefix/title (Mr, Mrs, Dr. etc) as part of front end form that allows them to update their user details.
I have created a custom dropdown field and populated this with the titles that users can select. However, I'm having trouble displaying the dropdown on the front end form that allows users to select one option.
Any guidance on how I would go about achieving this would be helpful!

EDIT
This is what I had initially. However, this just prints each option as a separate select? 
{% set dropdownField = craft.fields.getFieldbyHandle('honorific') %}

{% for option in dropdownField.settings.options %}
    
        {{ option.label }}
    
{% endfor %}

**Tags:** form, frontend, custom-field

> **Comments:**
> **username_1**: Your `<select>` tags are inside the `for` loop. Move them outside the loop and you'll be golden!  

---

## 1 answers

### Answer by username_2 on 2016-01-22. Score: 3

Just to make sure I am on the same page, you have a select field within the control panel that is populated with the prefix/title(s)?
If that's the case, within your registration form, you could do something like this. Not tested, but should be close...
{% set options = craft.fields.getFieldByHandle('yourFieldHandle').getFieldType.options %}

{% if options|length %}
    Prefix
    
        {% for option in options %}
            {{ option.label }}
        {% endfor %}
    
{% endif %}

EDIT
Good catch by @Benjammin'. You will need the options part to actually access the values. I've updated my answer, give it another try.

> **Comments:**
> **username_0**: That didn't seem to do the trick. Was returning a template error.  
> **username_3**: Code looks legit. What was the error?  
> **username_1**: The `options` variable is getting the `FieldModel`, not the list of options. To get the list of options you need to access `.settings.options` on the field model.  

---

