<p>Something like this should do what you're looking for and will work for any number of rows:</p>

<pre><code>{% set reallyEmpty = true %}

{% if entry.tableField | length %}
    {# Since you've got a default row set, we're guaranteed that [0] will be set #}
    {% for column in entry.tableField[0] %}
        {% if column|length %}
            {% set reallyEmpty = false %}
        {% endif %}
    {% endfor %}
{% endif %}

{% if reallyEmpty %}
    It's really empty.
{% else %}
    It's not empty.
{% endif %}
</code></pre>

CC BY-SA 3.0
2015-10-02T01:52:56.053Z
2015-10-02T01:52:56.053Z
Brad Bell
<p>You can do something like this:</p>

<pre><code>{% if entry.tableField|length and (
      entry.tableField[0].columnHandleOne or
      entry.tableField[0].columnHandleTwo or
      entry.tableField[0].columnHandleThree
   ) %}
</code></pre>

<p>If there’s only one column that you really care about being filled, you can simplify that to:</p>

<pre><code>{% if entry.tableField|length and entry.tableField[0].columnHandle %}
</code></pre>

CC BY-SA 3.0
2015-10-01T22:14:20.013Z
2015-10-01T22:14:20.013Z
Brandon Kelly
<p>For anyone googling this issue, like I did, you can also just update the <code>Default Values</code> in the Table fieldtype and remove the empty row that comes with that fieldtype </p>

CC BY-SA 4.0
2020-06-09T20:41:52.063Z
2020-06-09T20:41:52.063Z
Mark Busnelli Jr
<p>We have a table field that has the default value of 1 row when a new entry is published.</p>

<p>Unfortunately, we have </p>

<p><code>{% if entry.tableField | length %} display markup and field content... {% endif %}</code> </p>

<p>and this will always be true of each entry because of the Craft default.</p>

<p>Obviously, we can remove the default row in the future but wondered if there was a way to extend that condition to say, for example</p>

<p><code>{% if (entry.tableField | length) and (entry.tableField.row | length) %}</code></p>

CC BY-SA 3.0
2015-09-30T21:37:04.457Z
What is `entry.tableField.row` meant to say? You want to check if the table field has at least one row and...?
Brad Bell
CC BY-SA 3.0
2015-10-01T09:53:57.180Z
and has content within one of the row cells
Steven Grant
<templating><conditional><table-field>
Check if a table field’s row has a value
# Check if a table field’s row has a value

(Asked by: username_0 on 2015-09-30)

We have a table field that has the default value of 1 row when a new entry is published.

Unfortunately, we have

`{% if entry.tableField | length %} display markup and field content... {% endif %}`

and this will always be true of each entry because of the Craft default.

Obviously, we can remove the default row in the future but wondered if there was a way to extend that condition to say, for example

`{% if (entry.tableField | length) and (entry.tableField.row | length) %}`

**Tags:** templating, conditional, table-field

> **Comments:**
> **username_1**: What is `entry.tableField.row` meant to say? You want to check if the table field has at least one row and...?  
> **username_0**: and has content within one of the row cells  

---

## 3 answers

### Answer by username_1 on 2015-10-02. Score: 5

Something like this should do what you're looking for and will work for any number of rows:
{% set reallyEmpty = true %}

{% if entry.tableField | length %}
    {# Since you've got a default row set, we're guaranteed that [0] will be set #}
    {% for column in entry.tableField[0] %}
        {% if column|length %}
            {% set reallyEmpty = false %}
        {% endif %}
    {% endfor %}
{% endif %}

{% if reallyEmpty %}
    It's really empty.
{% else %}
    It's not empty.
{% endif %}


---

### Answer by username_2 on 2015-10-01. Score: 3

You can do something like this:
{% if entry.tableField|length and (
      entry.tableField[0].columnHandleOne or
      entry.tableField[0].columnHandleTwo or
      entry.tableField[0].columnHandleThree
   ) %}

If there’s only one column that you really care about being filled, you can simplify that to:
{% if entry.tableField|length and entry.tableField[0].columnHandle %}


---

### Answer by username_3 on 2020-06-09. Score: 1

For anyone googling this issue, like I did, you can also just update the `Default Values` in the Table fieldtype and remove the empty row that comes with that fieldtype


---

