<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>

CC BY-SA 3.0
2015-02-03T09:06:24.930Z
You can also just do `{% if entry.dropdownFieldHandle %}` (see [`if` tag docomantation](http://twig.sensiolabs.org/doc/tags/if.html)).
carlcs
CC BY-SA 3.0
2015-02-03T09:26:39.610Z
^Ah yes. Even cleaner :)
naboovalley
CC BY-SA 3.0
2015-02-03T09:02:13.363Z
2015-02-03T09:02:13.363Z
naboovalley
<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>

<drop-down>
Dropdown empty option
# 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 %}
Title
{{ entry.dropdownFieldHandle }}
{% 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 != "" %}
    Title
    {{ entry.dropdownFieldHandle }}
{% 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 :)  

---

