<p>Simply put, an <a href="http://buildwithcraft.com/docs/entries-fields">Entries field</a> is an array containing entry ids, and your form needs to send it that way.</p>

<p>Just replace <code>name="fields[tbdDesignerUrl]"</code> with <code>name="fields[tbdDesignerUrl][]"</code>. That way the <a href="http://php.net/manual/en/faq.html.php#faq.html.arrays">value gets submitted as an array</a>.</p>

<p>Also replace <code>value="{{ entry.designerUrl }}"</code> with <code>value="{{ entry.id }}"</code>, since we need the submitted value to be an <a href="http://buildwithcraft.com/docs/templating/entrymodel#id">entry id</a>.</p>

CC BY-SA 3.0
2014-07-20T21:07:13.113Z
2014-07-20T21:07:13.113Z
Victor
<p>I have an <a href="http://buildwithcraft.com/docs/entries-fields">Entries field</a> that I need to have as a drop-down field in my front-end form. The code below is displaying the correct options, although after selecting and submitting the form, the <code>tbdDesignerUrl</code>-field is not populated with the selection in the entry.<br>
It shows as nothing selected. (<code>tbdDesignerUrl</code> is the name of the Entires field I am trying to populate through the form and <code>entry.designerUrl</code> is the field I am using to select the entry in the options.)</p>

<pre class="lang-twig prettyprint-override"><code>{% set entries = craft.entries.section('designers') %}
  &lt;select name="fields[tbdDesignerUrl]" id="fields[tbdDesignerUrl]"&gt;
    {% for entry in entries %}
     &lt;option value="{{ entry.designerUrl }}"&gt;{{ entry.designerUrl }}&lt;/option&gt;
    {% endfor %}
  &lt;/select&gt;
</code></pre>

<p>Thanks for any help you can give! :)</p>

<entries-field>
How do I use a Dropdown 'Entries' Field Type in a Front End Form
# How do I use a Dropdown 'Entries' Field Type in a Front End Form

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

I have an Entries field that I need to have as a drop-down field in my front-end form. The code below is displaying the correct options, although after selecting and submitting the form, the tbdDesignerUrl-field is not populated with the selection in the entry.
It shows as nothing selected. (tbdDesignerUrl is the name of the Entires field I am trying to populate through the form and entry.designerUrl is the field I am using to select the entry in the options.)
{% set entries = craft.entries.section('designers') %}
  
    {% for entry in entries %}
     {{ entry.designerUrl }}
    {% endfor %}
  

Thanks for any help you can give! :)

**Tags:** entries-field


---

## 1 answers

### Answer by username_1 on 2014-07-20. Score: 8 | Accepted answer

Simply put, an [Entries field](http://buildwithcraft.com/docs/entries-fields) is an array containing entry ids, and your form needs to send it that way.

Just replace `name="fields[tbdDesignerUrl]"` with `name="fields[tbdDesignerUrl][]"`. That way the [value gets submitted as an array](http://php.net/manual/en/faq.html.php#faq.html.arrays).

Also replace `value="{{ entry.designerUrl }}"` with `value="{{ entry.id }}"`, since we need the submitted value to be an [entry id](http://buildwithcraft.com/docs/templating/entrymodel#id).


---

