Answers.Body: <p>You can access the field using <code>currentUser.fieldHandle</code>; and the 'labels' and 'values' of the field by looping through the <code>options</code> attribute. You can also set the selected state by checking each option for the <code>option.selected</code> property.</p>
  
  <pre><code>&lt;select id="radioButtons" name="fields[myRadioButton]"&gt;
      {% for option in currentUser.myRadioButton.options %}
          &lt;option value="{{ option.value }}" {% if option.selected %}checked{% endif %}&gt;{{ option.label }}&lt;/option&gt;
      {% endfor %}
  &lt;/select&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-23T17:57:12.167Z
Answers.Text: Exactly what I wanted. That answers other questions I had as well. Thanks Douglas
Answers.UserDisplayName: user2056505
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-23T06:07:27.873Z
Answers.LastActivityDate: 2015-04-23T06:07:27.873Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>In the <a href="http://buildwithcraft.com/docs/templating/user-profile-form" rel="nofollow">official documentation</a> it explains how to let users customize user fields in the frontend, such as:</p>
  
  <pre><code>&lt;label for="bio"&gt;Bio&lt;/label&gt;
  &lt;textarea id="bio" name="fields[bio]"&gt;{{ currentUser.bio }}&lt;/textarea&gt;
  </code></pre>
  
  <p>However I set some user profile fields that are Radio Buttons and can't find anywhere on how to output the field options in a form. I want to do something like:</p>
  
  <pre><code>&lt;select id="radioButtons" name="fields[radioButtons]"&gt;
    {% for option in fields.profile.myRadioButtons %}
      &lt;option value="option"&gt;{{ option | title }}&lt;/option&gt;
    {% endfor %}
  &lt;/select&gt;
  </code></pre>
  
  <p>But obviously 'fields' isn't a twig variable. Is there a way to do something similar to the above?</p>
  
Tags: <templating><form><field>
Title: Frontend Profile - Listing out Radio Buttons
ThreadText: # Frontend Profile - Listing out Radio Buttons
  
  (Asked by: username_0 on 2015-04-23)
  
  In the [official documentation](http://buildwithcraft.com/docs/templating/user-profile-form) it explains how to let users customize user fields in the frontend, such as:
  
  ```
  <label for="bio">Bio</label>
  <textarea id="bio" name="fields[bio]">{{ currentUser.bio }}</textarea>
  
  ```
  
  However I set some user profile fields that are Radio Buttons and can't find anywhere on how to output the field options in a form. I want to do something like:
  
  ```
  <select id="radioButtons" name="fields[radioButtons]">
    {% for option in fields.profile.myRadioButtons %}
      <option value="option">{{ option | title }}</option>
    {% endfor %}
  </select>
  
  ```
  
  But obviously 'fields' isn't a twig variable. Is there a way to do something similar to the above?
  
  **Tags:** templating, form, field
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-23. Score: 2 | Accepted answer
  
  You can access the field using `currentUser.fieldHandle`; and the 'labels' and 'values' of the field by looping through the `options` attribute. You can also set the selected state by checking each option for the `option.selected` property.
  
  ```
  <select id="radioButtons" name="fields[myRadioButton]">
      {% for option in currentUser.myRadioButton.options %}
          <option value="{{ option.value }}" {% if option.selected %}checked{% endif %}>{{ option.label }}</option>
      {% endfor %}
  </select>
  
  ```
  
  > **Comments:**
  > **username_0**: Exactly what I wanted. That answers other questions I had as well. Thanks username_1  
  
  ---
  
  