<p>Filtering entries is now possible as of <a href="http://sprout.barrelstrengthdesign.com/craft-plugins/forms/updates#release-v2.2.0" rel="nofollow">Sprout Forms v2.2.0</a>:</p>

<pre><code>{% for formEntry in craft.sproutForms.entries.formHandle('contact').firstName('Zoe') %}
  ...
{% endfor %#}
</code></pre>

CC BY-SA 3.0
2016-02-05T09:37:27.163Z
I've updated, but can't test it because now it produces an error in the assets field. see my support mail
noregt
CC BY-SA 3.0
2016-02-06T10:38:24.540Z
Updated to 2.2.1 and everything works like expected now :-)
noregt
CC BY-SA 3.0
2016-02-05T02:29:11.200Z
2016-02-05T02:29:11.200Z
Ben Parizek
<p>I believe this should work...</p>

<pre><code>{% for formEntry in craft.sproutForms.entries.formHandle('formHandle').search('fieldname:fieldvalue') %}
    {{formEntry.fieldname}}
{% endfor %} 
</code></pre>

CC BY-SA 3.0
2016-02-06T10:39:12.597Z
With the latest update to 2.2.1 this now works like it should, thanks
noregt
CC BY-SA 3.0
2016-01-06T09:14:07.943Z
This only works partly. "search('fieldvalue')" works, but is insufficient. search('fieldname:fieldvalue') returns nothing. PS; I think it should be fieldhandle, but that gives the same results.
noregt
CC BY-SA 3.0
2016-01-05T18:54:12.837Z
2016-01-05T18:54:12.837Z
Mutual
<p>I'm trying to display form entries from Sprout Forms that match a specific criterium:</p>

<pre><code>{% for formEntry in craft.sproutForms.entries.formHandle('formHandle').fieldname('fieldvalue') %}
    {{formEntry.fieldname}}
{% endfor %} 
</code></pre>

<p>This does not filter the entries.</p>

<p>This works:</p>

<pre><code>{% for formEntry in craft.sproutForms.entries.formHandle('formHandle') %}
    {% if fieldname == 'fieldvalue'%}
        {{formEntry.fieldname}}
    {% endif %} 
{% endfor %} 
</code></pre>

<p>Can this not be done with parameters, or am I using the wrong Entry model?</p>

CC BY-SA 3.0
2016-01-06T09:15:59.667Z
PS; I assume fieldname should be fieldhandle
noregt
<entries><filter><entrymodel><plugin-sproutforms>
Filter Sprout Forms entries based on field value, using parameters
# Filter Sprout Forms entries based on field value, using parameters

(Asked by: username_0 on 2016-01-05)

I'm trying to display form entries from Sprout Forms that match a specific criterium:
{% for formEntry in craft.sproutForms.entries.formHandle('formHandle').fieldname('fieldvalue') %}
    {{formEntry.fieldname}}
{% endfor %} 

This does not filter the entries.
This works:
{% for formEntry in craft.sproutForms.entries.formHandle('formHandle') %}
    {% if fieldname == 'fieldvalue'%}
        {{formEntry.fieldname}}
    {% endif %} 
{% endfor %} 

Can this not be done with parameters, or am I using the wrong Entry model?

**Tags:** entries, filter, entrymodel, plugin-sproutforms

> **Comments:**
> **username_0**: PS; I assume fieldname should be fieldhandle  

---

## 2 answers

### Answer by username_1 on 2016-02-05. Score: 4 | Accepted answer

Filtering entries is now possible as of Sprout Forms v2.2.0:
{% for formEntry in craft.sproutForms.entries.formHandle('contact').firstName('Zoe') %}
  ...
{% endfor %#}

> **Comments:**
> **username_0**: I've updated, but can't test it because now it produces an error in the assets field. see my support mail  
> **username_0**: Updated to 2.2.1 and everything works like expected now :-)  

---

### Answer by username_2 on 2016-01-05. Score: 1

I believe this should work...
{% for formEntry in craft.sproutForms.entries.formHandle('formHandle').search('fieldname:fieldvalue') %}
    {{formEntry.fieldname}}
{% endfor %}

> **Comments:**
> **username_0**: This only works partly. "search('fieldvalue')" works, but is insufficient. search('fieldname:fieldvalue') returns nothing. PS; I think it should be fieldhandle, but that gives the same results.  
> **username_0**: With the latest update to 2.2.1 this now works like it should, thanks  

---

