<p>In order to get all elements from an <code>ElementCriteriaModel</code> you need to call the <code>find()</code> function</p>

<pre><code>{% set form = craft.entries({section: 'registration'}).find() %}
</code></pre>

<p>You can them access those with normal array indexes </p>

CC BY-SA 3.0
2018-04-09T15:17:08.313Z
Can I access them with slugs? Do I need to make the slugs look like this: form[1], form[2]?
analog junkie
CC BY-SA 3.0
2018-04-09T15:23:21.617Z
Yes you can get your entries via slug as well 
`{% set form1 = craft.entries({section: 'registration', slug: 'form_1',}) .first() %}` `{% set form2 = craft.entries({section: 'registration', slug: 'form_2',}) .first() %}` and so on. You can grab them all with one query as well, when you do `{% set forms = craft.entries({section: 'registration', slug: ['form_2', 'form_1']}).find() %}` or if the slugs are equal
Robin Schambach
CC BY-SA 3.0
2018-04-06T11:38:28.200Z
2018-04-06T11:38:28.200Z
Robin Schambach
<p>I set up a form structure with a matrix. Now I would like to call the entries one by one. My first idea was to loop through them, but the outcome is that the entries are displayed alltogether. </p>

<p>Then I tryed to call them simply by the slug. Since there are just 4 of them. Not very dynamic though. </p>

<p>How can I call the sets of matrix contents one by one? </p>

<pre><code>{% set form = craft.entries({section: 'registration', slug: 'form_1',}) .first() %}
</code></pre>

<p>Didn't work. Still alltogether.</p>

CC BY-SA 3.0
2018-04-06T10:49:44.647Z
What are you going to do with them afterwards? I'm not really sure why you don't want to have them as array so you can do `form[0]`, `form[1]`
Robin Schambach
CC BY-SA 3.0
2018-04-06T10:58:39.693Z
The matrix entries are displayed as registration forms on the site. I do want to have the as array. But there are several arrays which I want to show seperately. Now they show all at once.
analog junkie
CC BY-SA 3.0
2018-04-06T11:05:58.490Z
Then you might not want to loop through the array directly?
Robin Schambach
<matrix><slug>
call matrix entries
# call matrix entries

(Asked by: username_0 on 2018-04-06)

I set up a form structure with a matrix. Now I would like to call the entries one by one. My first idea was to loop through them, but the outcome is that the entries are displayed alltogether. 
Then I tryed to call them simply by the slug. Since there are just 4 of them. Not very dynamic though. 
How can I call the sets of matrix contents one by one? 
{% set form = craft.entries({section: 'registration', slug: 'form_1',}) .first() %}

Didn't work. Still alltogether.

**Tags:** matrix, slug
> **Comments:**
> **username_1**: What are you going to do with them afterwards? I'm not really sure why you don't want to have them as array so you can do `form[0]`, `form[1]`  
> **username_0**: The matrix entries are displayed as registration forms on the site. I do want to have the as array. But there are several arrays which I want to show seperately. Now they show all at once.  
> **username_1**: Then you might not want to loop through the array directly?  

---

## 1 answers

### Answer by username_1 on 2018-04-06. Score: 2 | Accepted answer

In order to get all elements from an ElementCriteriaModel you need to call the find() function
{% set form = craft.entries({section: 'registration'}).find() %}

You can them access those with normal array indexes

> **Comments:**
> **username_0**: Can I access them with slugs? Do I need to make the slugs look like this: form[1], form[2]?  
> **username_1**: Yes you can get your entries via slug as well  `{% set form1 = craft.entries({section: 'registration', slug: 'form_1',}) .first() %}` `{% set form2 = craft.entries({section: 'registration', slug: 'form_2',}) .first() %}` and so on. You can grab them all with one query as well, when you do `{% set forms = craft.entries({section: 'registration', slug: ['form_2', 'form_1']}).find() %}` or if the slugs are equal  

---

