Answers.Body: <p>If the client selects an empty value you probably will get an empty value back.</p>
  
  <p>Try this:</p>
  
  <pre><code>{# Make sure we have a value #}
  {% if entry.dropdownFieldHandle != "" %}
      &lt;dt&gt;Title&lt;/dt&gt;
      &lt;dd&gt;{{ entry.dropdownFieldHandle }}&lt;/dd&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-03T09:06:24.930Z
Answers.Text: You can also just do `{% if entry.dropdownFieldHandle %}` (see [`if` tag docomantation](http://twig.sensiolabs.org/doc/tags/if.html)).
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-03T09:26:39.610Z
Answers.Text: ^Ah yes. Even cleaner :)
Answers.UserDisplayName: naboovalley
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-02-03T09:02:13.363Z
Answers.LastActivityDate: 2015-02-03T09:02:13.363Z
Answers.UserDisplayName: naboovalley
Body: <p>in order for my client to have the choice of selecting options or not, I entered an empty (blank) option in a dropdown field.</p>
  
  <p>In the frontend, I use this code:</p>
  
  <pre><code>{% if entry.dropdownFieldHandle|length %}
  &lt;dt&gt;Title&lt;/dt&gt;
  &lt;dd&gt;{{ entry.dropdownFieldHandle }}&lt;/dd&gt;
  {% endif %}
  </code></pre>
  
  <p>The problem is even if the client chooses the blank option, it still makes the code appear.</p>
  
  <p>Where am I wrong?</p>
  
Tags: <drop-down>
Title: Dropdown empty option
ThreadText: # Dropdown empty option
  
  (Asked by: username_0 on 2015-02-03)
  
  in order for my client to have the choice of selecting options or not, I entered an empty (blank) option in a dropdown field.
  
  In the frontend, I use this code:
  
  ```
  {% if entry.dropdownFieldHandle|length %}
  <dt>Title</dt>
  <dd>{{ entry.dropdownFieldHandle }}</dd>
  {% endif %}
  
  ```
  
  The problem is even if the client chooses the blank option, it still makes the code appear.
  
  Where am I wrong?
  
  **Tags:** drop-down
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-02-03. Score: 4 | Accepted answer
  
  If the client selects an empty value you probably will get an empty value back.
  
  Try this:
  
  ```
  {# Make sure we have a value #}
  {% if entry.dropdownFieldHandle != "" %}
      <dt>Title</dt>
      <dd>{{ entry.dropdownFieldHandle }}</dd>
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_2**: You can also just do `{% if entry.dropdownFieldHandle %}` (see [`if` tag docomantation](http://twig.sensiolabs.org/doc/tags/if.html)).  
  > **username_1**: ^Ah yes. Even cleaner :)  
  
  ---
  
  