<p>I might get you wrong but they must have the option to add as many youtube embed videos as they want?</p>

<p>Isn't it an option to let your client make a new block for every embed and just loop over the blocks they made? </p>

<p>So your block would look like:</p>

<p>Youtube Video (block)</p>

<ul>
<li>Youtube embed link</li>
<li>Youtube Description</li>
</ul>

<p>So they just have to add a block when they want a new one and you can just loop over them like you would with any matrixblock?</p>

CC BY-SA 3.0
2017-03-06T15:55:19.440Z
Yes, that does sound like what I WANT to do with this, but I'm just not seeing a way to do that in the dashboard-- Glad my question at least sounds sensible... It would be great to just make one generic field for the embed and description in the block and let the user add additional fields with that same type/handle as needed... I'm hoping I've just overlooked this functionality somewhere and that it's not just a "would be nice" situation........
scoffin
CC BY-SA 3.0
2017-03-06T16:36:53.697Z
Why would you use it for the dashboard? If you add  the matrix to a page they can keep adding videos or How do you mean on the dashboard?
Justin Dekkers
CC BY-SA 3.0
2017-03-06T16:37:54.820Z
Meh... It looks like I jumped the gun and it is an option right from the dashboard... It was my first Matrix field so I think I just misunderstood how they worked... Womp womp. Thank you for responding, @Justin Dekkers!
scoffin
CC BY-SA 3.0
2017-03-06T15:49:56.053Z
2017-03-06T15:49:56.053Z
Justin Dekkers
<p>I'm trying to create a Matrix field containing plain text blocks of two kinds, one for providing Youtube video embed codes, and one for providing a description. What I want to know is, is there a way to make it so users can add another field of either kind if they want to embed another video and/or provide another description, or do I have to "build" each field option in manually?</p>

<p>For example, the less elegant way I tried to solved this problem involved creating multiple fields, but since the handles all have to be different, I tacked a number onto each (mainYoutubeEmbed, youtubeEmbed2, youtubeEmbed3, and etc.) This just seems so clumsy and is completely non-DRY. The other option I considered to make it slightly better was to create a bunch of generic fields all with the same title and handle (so I could just loop through them), but Craft says that the handles must be unique.</p>

<p>Is there any way around this or a way to make it at least a little better, or is the best approach really to just create a bunch of fields and hope that my users don't need more in the future? Maybe a plug-in or magic incantation of some kind?? :)</p>

<p>PS. I know the titles can be the same, but I changed them to match the handles because if I find that I'm stuck with this janky method, I want it to be as easy as possible to "see" how it's laid-out.</p>

<p>Thank you in advance for all constructive advice.</p>

<p><a href="https://i.sstatic.net/6AVT4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6AVT4.png" alt="enter image description here"></a></p>

<matrix><users><dashboard>
Can I Create a Way for Users to Add Fields from the Dashboard and/or create Fields with Same Handle?
# Can I Create a Way for Users to Add Fields from the Dashboard and/or create Fields with Same Handle?

(Asked by: username_0 on 2017-03-06)

I'm trying to create a Matrix field containing plain text blocks of two kinds, one for providing Youtube video embed codes, and one for providing a description. What I want to know is, is there a way to make it so users can add another field of either kind if they want to embed another video and/or provide another description, or do I have to "build" each field option in manually?

For example, the less elegant way I tried to solved this problem involved creating multiple fields, but since the handles all have to be different, I tacked a number onto each (mainYoutubeEmbed, youtubeEmbed2, youtubeEmbed3, and etc.) This just seems so clumsy and is completely non-DRY. The other option I considered to make it slightly better was to create a bunch of generic fields all with the same title and handle (so I could just loop through them), but Craft says that the handles must be unique.

Is there any way around this or a way to make it at least a little better, or is the best approach really to just create a bunch of fields and hope that my users don't need more in the future? Maybe a plug-in or magic incantation of some kind?? :)

PS. I know the titles can be the same, but I changed them to match the handles because if I find that I'm stuck with this janky method, I want it to be as easy as possible to "see" how it's laid-out.

Thank you in advance for all constructive advice.

[![enter image description here](https://i.sstatic.net/6AVT4.png)](https://i.sstatic.net/6AVT4.png)

**Tags:** matrix, users, dashboard

---

## 1 answers

### Answer by username_1 on 2017-03-06. Score: 2 | Accepted answer

I might get you wrong but they must have the option to add as many youtube embed videos as they want?

Isn't it an option to let your client make a new block for every embed and just loop over the blocks they made?

So your block would look like:

Youtube Video (block)

* Youtube embed link
* Youtube Description

So they just have to add a block when they want a new one and you can just loop over them like you would with any matrixblock?

> **Comments:**
> **username_0**: Yes, that does sound like what I WANT to do with this, but I'm just not seeing a way to do that in the dashboard-- Glad my question at least sounds sensible... It would be great to just make one generic field for the embed and description in the block and let the user add additional fields with that same type/handle as needed... I'm hoping I've just overlooked this functionality somewhere and that it's not just a "would be nice" situation........  
> **username_1**: Why would you use it for the dashboard? If you add  the matrix to a page they can keep adding videos or How do you mean on the dashboard?  
> **username_0**: Meh... It looks like I jumped the gun and it is an option right from the dashboard... It was my first Matrix field so I think I just misunderstood how they worked... Womp womp. Thank you for responding, @Justin Dekkers!  

---

