<p>I believe that you can get the options directly from the 'currentUser' entry, without referring to 'user' separately (they are likely the same thing in this case anyway):</p>

<pre><code>&lt;label for="providerLanguages"&gt;What languages do you work with?&lt;/label&gt;
{% for option in currentUser.providerLanguages.options %}
    &lt;input type="checkbox" id="providerLanguages" name="fields[providerLanguages][]"
    {% if option.selected %}checked{% endif %} value="{{ option.value }}"&gt;
        {{ option.label }}
    &lt;/input&gt;
{% endfor %}
</code></pre>

<p>The value is also available as 'option.value' instead of 'option.selected'.</p>

CC BY-SA 3.0
2014-11-20T23:53:22.540Z
`user` is deprecated. `currentUser` is the way to go.
Brad Bell
CC BY-SA 3.0
2014-11-20T23:59:55.307Z
@Brad what will the variable be called when viewing or editing someone else's profile?
Douglas McDonald
CC BY-SA 3.0
2014-11-21T00:04:06.993Z
Whatever you set it to? Pretty sure that was the original issue. `user` used to be global, but people were inadvertently overwriting it in their template code, so we changed the global to `currentUser`.
Brad Bell
CC BY-SA 3.0
2014-11-20T23:35:07.680Z
2014-11-20T23:35:07.680Z
Douglas McDonald
<p>I'm trying to set up a front end user profile that will allow the user to use the multi-select field. When I update from the CP, the changes are reflected on the front end, but this isn't working when trying to update from the front end form.</p>

<p>Is there anything I'm missing?</p>

<pre><code>{% set languageOptionsIds = user.providerLanguages %}

&lt;label for="providerLanguages"&gt;What languages do you work with?&lt;/label&gt;
{% for option in currentUser.providerLanguages.options %}
    &lt;input type="checkbox" id="providerLanguages" name="fields[providerLanguages][]"
    {% if option.selected in languageOptionsIds %}checked{% endif %} value="{{ option.selected }}"&gt;{{ option.label }}
    &lt;/input&gt;
{% endfor %}
</code></pre>

<templating><users><form>
Edit multi-select field from front end
# Edit multi-select field from front end

(Asked by: username_0 on 2014-11-20)

I'm trying to set up a front end user profile that will allow the user to use the multi-select field. When I update from the CP, the changes are reflected on the front end, but this isn't working when trying to update from the front end form.
Is there anything I'm missing?
{% set languageOptionsIds = user.providerLanguages %}

What languages do you work with?
{% for option in currentUser.providerLanguages.options %}
    {{ option.label }}
    
{% endfor %}

**Tags:** templating, users, form

---

## 1 answers

### Answer by username_1 on 2014-11-20. Score: 3 | Accepted answer

I believe that you can get the options directly from the 'currentUser' entry, without referring to 'user' separately (they are likely the same thing in this case anyway):
What languages do you work with?
{% for option in currentUser.providerLanguages.options %}
    
        {{ option.label }}
    
{% endfor %}

The value is also available as 'option.value' instead of 'option.selected'.

> **Comments:**
> **username_2**: `user` is deprecated. `currentUser` is the way to go.  
> **username_1**: @Brad what will the variable be called when viewing or editing someone else's profile?  
> **username_2**: Whatever you set it to? Pretty sure that was the original issue. `user` used to be global, but people were inadvertently overwriting it in their template code, so we changed the global to `currentUser`.  

---

