Answers.Body: <p>On your dropdown field's <code>name</code>, you need a <code>[]</code> on the end for it to submit properly:</p>
  
  <pre><code>name="fields[demographic][]"
  </code></pre>
  
  <p>As mentioned in <a href="https://craftcms.stackexchange.com/questions/1787/assign-category-via-guest-entry-form">this answer</a>, the dropdown field is basically an array of options, so you need that empty array on the end for them to be stored in.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-10T15:58:17.410Z
Answers.LastActivityDate: 2018-12-10T15:58:17.410Z
Answers.UserDisplayName: Jalen Davenport
Body: <p>My front-end new entry form works, but when I add the complexity of a dropdown to the mix - it error's and doesn't save the entry. (I found this out with trial and error, removing fields until I found the culprit - the dropdowns)</p>
  
  <p>I'm unsure what errors it's returning, but I'm sure something may be off with the code.</p>
  
  <pre><code>  {% macro errorList(errors) %}
              {% if errors %}
                  &lt;ul class="errors"&gt;
                      {% for error in errors %}
                          &lt;li&gt;{{ error }}&lt;/li&gt;
                      {% endfor %}
                  &lt;/ul&gt;
              {% endif %}
          {% endmacro %}
  
          {% from _self import errorList %}
  
          &lt;form method="post" accept-charset="UTF-8" enctype="multipart/form-data"&gt;
              {{ csrfInput() }}
              &lt;input type="hidden" name="action" value="entries/save-entry"&gt;
              {{ redirectInput('/listings/') }}
              &lt;input type="hidden" name="sectionId" value="1"&gt;
              &lt;input type="hidden" name="enabled" value="1"&gt;
  
              &lt;div class="form-group"&gt;
                &lt;label&gt;Demographic&lt;/label&gt;
                &lt;select class="form-control" id="listingType" name="fields[demographic]"&gt;
                  {% set demographicField = craft.fields.getFieldbyHandle('demographic') %}
                  {% for option in demographicField.settings.options %}
                    &lt;option&gt;{{ option.label }}&lt;/option&gt;
                  {% endfor %}
                &lt;/select&gt;
              &lt;/div&gt;
  
              &lt;button class="btn btn-primary btn-md semi-bold" type="submit"&gt;Create Listing&lt;/button&gt;
  
          &lt;/form&gt;
  </code></pre>
  
Tags: <templating><form>
Title: Front End Entry Form Select Dropdown Error
ThreadText: # Front End Entry Form Select Dropdown Error
  
  (Asked by: username_0 on 2018-12-09)
  
  My front-end new entry form works, but when I add the complexity of a dropdown to the mix - it error's and doesn't save the entry. (I found this out with trial and error, removing fields until I found the culprit - the dropdowns)
  
  I'm unsure what errors it's returning, but I'm sure something may be off with the code.
  
  ```
    {% macro errorList(errors) %}
              {% if errors %}
                  <ul class="errors">
                      {% for error in errors %}
                          <li>{{ error }}</li>
                      {% endfor %}
                  </ul>
              {% endif %}
          {% endmacro %}
  
          {% from _self import errorList %}
  
          <form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
              {{ csrfInput() }}
              <input type="hidden" name="action" value="entries/save-entry">
              {{ redirectInput('/listings/') }}
              <input type="hidden" name="sectionId" value="1">
              <input type="hidden" name="enabled" value="1">
  
              <div class="form-group">
                <label>Demographic</label>
                <select class="form-control" id="listingType" name="fields[demographic]">
                  {% set demographicField = craft.fields.getFieldbyHandle('demographic') %}
                  {% for option in demographicField.settings.options %}
                    <option>{{ option.label }}</option>
                  {% endfor %}
                </select>
              </div>
  
              <button class="btn btn-primary btn-md semi-bold" type="submit">Create Listing</button>
  
          </form>
  
  ```
  
  **Tags:** templating, form
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-10. Score: 3 | Accepted answer
  
  On your dropdown field's `name`, you need a `[]` on the end for it to submit properly:
  
  ```
  name="fields[demographic][]"
  
  ```
  
  As mentioned in [this answer](https://craftcms.stackexchange.com/questions/1787/assign-category-via-guest-entry-form), the dropdown field is basically an array of options, so you need that empty array on the end for them to be stored in.
  
  
  ---
  
  