Allow a dropdown custom field to be edit from a front end form 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 %}
    &lt;select id="honorific" name="honorific"&gt;
        &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
    &lt;/select&gt;
{% endfor %}
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 %}
    &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 %}


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.