Answers.Body: <p>You will only get the defaults for new entries.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-09T23:11:00.610Z
Answers.LastActivityDate: 2015-10-09T23:11:00.610Z
Answers.UserDisplayName: carlcs
Body: <p>In the CP I have a table field called <code>colors</code>. I have two columns, "Label" and "Value".</p>
  
  <p>I have populated the table with two default values "Red" and "Blue" (attached).
  <a href="https://i.sstatic.net/uZnIX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uZnIX.png" alt="enter image description here"></a></p>
  
  <p>This table will ultimately populate a dropdown on the front end. Label being the label, and value being the value.</p>
  
  <p>When I edit the entry that I have assigned the <code>colors</code> field to, the default values do not show. I can only choose "Add a row". I <em>do</em> want to be able to add/remove rows like this, but I'd like to have "Red" and "Blue" be there by default.</p>
  
  <p><a href="https://i.sstatic.net/F19RG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/F19RG.png" alt="enter image description here"></a></p>
  
  <p>On the template level I create the dropdown like this:</p>
  
  <pre><code>{% if entry.colors|length %}
  &lt;select id="colors" name="colors"&gt;
      &lt;option value=""&gt;Select&lt;/option&gt;
      {% for color in entry.colors %}
          &lt;option value="{{ color.value }}"&gt;{{ color.label }}&lt;/option&gt;
      {% endfor %}
  &lt;/select&gt;
  {% endif %}
  </code></pre>
  
  <p>The drop down does not show until I enter a value in the entry. I'm not sure what I'm doing wrong so that the drop down will pull in the default values by...default.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-09T17:31:53.583Z
Comments.Text: You will only get the defaults for new entries! Do they show up with new entries?
Comments.UserDisplayName: carlcs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-09T18:08:31.207Z
Comments.Text: What the....
  I SWEAR I I TRIED THAT. 
  
  ...and yet another silly question by yours truly. Post your comment as the answer and I'll check it. Thank you!!
Comments.UserDisplayName: Damon
Tags: <table-field><drop-down><default>
Title: How can I populate a dropdown via table field type using the default values?
ThreadText: # How can I populate a dropdown via table field type using the default values?
  
  (Asked by: username_0 on 2015-10-09)
  
  In the CP I have a table field called `colors`. I have two columns, "Label" and "Value".
  
  I have populated the table with two default values "Red" and "Blue" (attached).
  [![enter image description here](https://i.sstatic.net/uZnIX.png)](https://i.sstatic.net/uZnIX.png)
  
  This table will ultimately populate a dropdown on the front end. Label being the label, and value being the value.
  
  When I edit the entry that I have assigned the `colors` field to, the default values do not show. I can only choose "Add a row". I *do* want to be able to add/remove rows like this, but I'd like to have "Red" and "Blue" be there by default.
  
  [![enter image description here](https://i.sstatic.net/F19RG.png)](https://i.sstatic.net/F19RG.png)
  
  On the template level I create the dropdown like this:
  
  ```
  {% if entry.colors|length %}
  <select id="colors" name="colors">
      <option value="">Select</option>
      {% for color in entry.colors %}
          <option value="{{ color.value }}">{{ color.label }}</option>
      {% endfor %}
  </select>
  {% endif %}
  
  ```
  
  The drop down does not show until I enter a value in the entry. I'm not sure what I'm doing wrong so that the drop down will pull in the default values by...default.
  
  **Tags:** table-field, drop-down, default
  
  > **Comments:**
  > **username_1**: You will only get the defaults for new entries! Do they show up with new entries?  
  > **username_0**: What the.... I SWEAR I I TRIED THAT.   ...and yet another silly question by yours truly. Post your comment as the answer and I'll check it. Thank you!!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-09. Score: 2 | Accepted answer
  
  You will only get the defaults for new entries.
  
  
  ---
  
  