diff --git a/008-Advanced-Fields.md b/008-Advanced-Fields.md index 0b03fba..821e20e 100644 --- a/008-Advanced-Fields.md +++ b/008-Advanced-Fields.md @@ -61,8 +61,14 @@ Back to the UI. That is where I get these values. Showing it to you in here, go There's also one called custom user. The custom user at the moment doesn't look like I have any [00:31:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m08s) in the demo data for you. I just click on new and then select custom user. You'd see that the custom user basically, you don't need to set or change anything from [00:31:25](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m25s) here to there. All those should actually just work. The only part that you want to consider removing, would be the PHP, This part here(see video). Basically what this part does, it limits the user list [00:31:47](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m47s) to only a certain group. That means again you need to set up a global value in your component field. In our Global, remember we talked about that previously. The options button, if you click on options, [00:32:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m07s) it opens a place which you set global. These are all global values. This is a area for global values. You can get hold of those global values through the component helper, getparams with a component name. And get when there(###text###) you would place the field name. [00:32:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s) That's how you can get a value from your global settings. And basically I'm getting a specific groups value and placing it in here(groups). And then I am returning that group. That is all this part(see video) is doing. Those two sections are actually independent. So this one is what helps you set. [00:32:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m52s) I want to return a specific group. This part helps you set any users you want to exclude. This specific feature here, ensures that only one record per user is set. Let's say a user has already been added to a previous record, then that user should not show up again. [00:33:18](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s) It should be removed from the list. This is what this PHP is doing. It's simply looking to this current view and checking if there is users and getting their ID's. And then setting them up in the correct manner. They are unique and then returns them. [00:33:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m36s) Those are the users that already have. If you are building something which are supposed to have student details, for example, you don't want a student to have more than one entry in that table, you want every student to just have one in. [00:33:58](https://www.youtube.com/watch?v=VpzYbifHTMLqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m58s) And so if a student already is selected, you wouldn't want them to be selected again, that's what this exclude feature does. -Now to show that to you in the code. Let's go to another project that I am working on called learning manager and models. And they have a field called studentusers and studentuser. [00:34:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m27s) There are two kinds of ways to do this. One is to not allow more than one user to have an entry. And the one is saying exclude users that already have been used. So that means if a user have been selected that whole thing that I've just explained. [00:34:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m52s) The other one returns null. Which means it will always show all users. And the way to have it set this to null would be simply to remove that part(selected on video) of the code. Then it will automatically set this(return null) value to null, component builder will do that. When I gets about the group part ihttpst's the same principle. [00:35:19](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) If you don't want it to just show a specific group, you can actually set it to null. Like that(return null) and component builder will do that. All you need to do is simply remove what is part of the code. And it will actually do that. And that is to target a specific group. [00:35:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m48s) And also to target or to remove specific users. Let's say that you want to remove users that belongs to other table or other structure, then all that PHP that you need to write you can place it on the type_phpx. [00:36:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m11s) So you could do that type_phpx1=. All your PHP can be placed in here for excluding. And for the group, it's simply, not directly one, it must have an underscore(_). [00:36:33](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m33s) You can just take that one. And This one will be used for the groups. It says it there. Getexcluded method. PHP for the getgroup method. And in the code which is stored under fields, models. You will see what it will do. You can do things and then come and look [00:36:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m59s) what did component builder build. How does it look then. You can go to the view like we have here. +Now to show that to you in the code. Let's go to another project that I am working on called learning manager and models. And they have a field called studentusers and studentuser. [00:34:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m27s) There are two kinds of ways to do this. One is to not allow more than one user to have an entry. And the one is saying exclude users that already have been used. So that means if a user have been selected that whole thing that I've just explained. [00:34:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m52s) The other one returns null. Which means it will always show all users. And the way to have it set this to null would be simply to remove that part(selected on video) of the code. Then it will automatically set this(return null) value to null, component builder will do that. When I gets about the group part it's the same principle. [00:35:19](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) If you don't want it to just show a specific group, you can actually set it to null. Like that(return null) and component builder will do that. All you need to do is simply remove what is part of the code. And it will actually do that. And that is to target a specific group. [00:35:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m48s) And also to target or to remove specific users. Let's say that you want to remove users that belongs to other table or other structure, then all that PHP that you need to write, you can place it on the type_phpx. [00:36:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m11s) So you could do that type_phpx1=. All your PHP can be placed in here for excluding. And for the group, it's simply, not directly one, it must have an underscore(_). [00:36:33](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m33s) You can just take that one. And this one will be used for the groups. It says it there Getexcluded method. PHP for the getgroup method. And in the code which is stored under fields, models. You will see what it will do. You can do things and then come and look [00:36:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m59s) what did component builder build. How does it look then. You can go to the view like we have here. And see does it's actually work? Is the preachers showing up? And then you can use firebug like that, and you can look, that one is [00:37:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m24s) of the index. You will use that(preacher). Here is a select list. And here you have the values. So that's the IDs and that is the actual name of the speaker. The ID and the name. That is how it should display the data. Component Builder sets up the XML structure that Joomla uses [00:37:53](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m53s) to build this. Joomla is building this whole structure for you. So even this nice button and everything is Joomla's handiwork. It is doing that for you and this is all done through these XML [00:38:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m08s) input values that you are adding here. So you would change the type to, you might say, staff members. R +There is something to remember here. The type names may not have underscores or any spaces in them. Anything that is not translatable usually needs to be [00:38:35](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m35s) not have any spaces. So you can't do this(add spaces). It will not work. So you must remove the underscore. You can do that(Uppercase M) but that will be made lowercase anyway. [00:38:57](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m57s) So you could just do that(lowercase m) instead. It will work because that is used not only in the file database but it's also used in the name convention and everywhere this file type is. So as you can see in here(code) that file type is called studentusers. And even the file is called that(studentusers). [00:39:21](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m21s) And here it is called studentuser, and here it is called studentuser. And this one(jformfieldstudentusers) is with the s. That one(studentusers) with a s. In the file is also with a s. So you can see that specific type name is used everywhere. And you cannot have underscores in this class name. Neither in this type name. [00:39:46](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m46s) Maybe you can but so far my experience is that it doesn't work if you do have it. For some reason it doesn't work. That's just a heads up on naming of this type. So you can update these fields. They are mostly fields that are [00:40:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m07s) related to all the other fields. But this one specifically says extends user. It shows you how it's going to extend it. So if you removed all the PHP then this field as it is now, will show all users everytime. Let me just [00:40:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m28s) close out here. That is looking at the advanced field type called custom user. +**Repeatable Custom Fields** -And see does it's actually work? Is the preachers showing up? And then you can use firebug like that, and you can look that one is [00:37:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m24s) index here is a select list. And here you have the values. So that's the ID And that is the actual name of the speaker and the ID and the name So that is how it should Display the data in Component Builder Sets up the XML structure that Joomla uses [00:37:53](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m53s) to build this actually Joomla is Building this whole structure For you So even this nice button and everything is Joomla's handiwork It is doing that For you And This is all done through these XML [00:38:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m08s) Input values that you are adding here So you would change the type to You might say staff members Oh yes there is something to To remember here The type names May not have under scores Or any spaces in them Fact anything that is not translatable Usually needs to be [00:38:35](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m35s) you know Not not have any underscores Sorry not have any spaces So you can't do this That would it will just not work So you must Remove the underscore You can do that but that's Sort of I Think it will be made lowercase anyway [00:38:57](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m57s) So you could just And then it will work because that is used not only In the file Database but it's also used in the name convention and Everywhere this file type So as you can see In here That file type is called studentusers And even the file is called that [00:39:21](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m21s) And here it is called Student user and here it is called student user And this one is with the s that one with a s in the file is also with a s So you can see that that that specific name type Name Is used everywhere And you cannot have underscores In this class name Neither in this type name [00:39:46](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m46s) You know maybe you can but So far my experience is that it doesn't work If you do Have it So for some reason it It doesn't work So that's just a heads up on Naming of this type And so you can update these Fields they are mostly Feels that are [00:40:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m07s) Sort of Related To all the other fields But this one specifically says extends user Ok so it actually Shows you how it's gonna extended So if you removed all the PHP then this field as it is now Whould show all users evertime Ok So let me just [00:40:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m28s) Close out here That is looking at the advanced field type called User Custom user Another one we need to look at is the repeatable fields Repeatable fields is actually not that difficult But you need to understand how it's sort of structure You need to first create the fields that you want to repeat Inside of repeatable fields The way repeatable field structure looks [00:40:55](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m55s) In Joomla I mean When we look at it in the actual application let me See where did I used a repeatable field OK here we have one So this from there all the way to there is one repeatable field And If you know a little XML and you worked with repeatable Fields you'll see that [00:41:23](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m23s) Here is the The fields that are being repeated Inside of the Repeatable field So basically repeatable field is a field type that has Other Fields inside of it Now you don't need to write any of this The way you would Structure a repeatable Fields actually Very very simple [00:41:47](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m47s) You first create the fields that you want to Repeat And do realize you can't use repeatable fields in repeatable fields But you can use custom advanced fields in repeatable fields So if you look at that We have here again You see there is a field type called cause and risks Now you if know Joomla You know there is no such field type cause and risks So that means this is a custom field so if I were to go to fields [00:42:16](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m16s) You see that there is a field called here cause Cause and risks And it basically Get set information From From this database table This is another component That I've done with component builder And it Is [00:42:35](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m35s) Displaying those data also making some model changes to the data And adding some Some style to it nonbreaking space and stuff like that Ok so that is that is just dealing with the Cause and risks So looking again at our repeatable field You're able to add an advance custom field Inside of it [00:43:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m00s) But what you need To add it Is let's Open Females For our example As you need to have the field ID And you need to order it according to the order you want to displayed in the Line [00:43:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m17s) Where you do repeatable fields So if we If we close here and then we go back to Creating a new admin view and I click on fields You see that there is 1 2 3 4 5 6 7 8 9 10 11 12 13 Fields In one row And if I click next and they all appear again [00:43:43](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m43s) And if I click next they all appear again And that's what repeatable Fields really is about Now this structure these Fields if we Would you look at it how did I develop This specific Pop-up Repeatable Structure well I can show that to you Here is a list of all the repeatable fields that I've already built This three pages of 20 [00:44:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m08s) If we were to click on add Files No wait we were lookingat add Fileds let's see add fields add fields There it is addfields for views Open that So this is the repeatable field for adding fields for Views And all you see here as I'm saying ok you could add 800 fields it way over kill But ok [00:44:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m37s) And we call him the button Add So if we go back to the view See it says add And then I'm adding an ID in a class to it A description which if we were to hover over it Here It has a little setup fields for this view Which is the description [00:44:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m59s) Same there see And the label is fields So it says There fields And Then the icon is list Now the icon Is what is shown in the button That is a list All the custom Joomla icons [00:45:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m17s) are You can can be used How to know these icons you should go to let me see There is a URL Docs.joomla.org / J3.x: Joomla_Standard_Icomoon_ fonds there you go That is the URL And you'll get to this page [00:45:41](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m41s) And These are all the available icons And you basically use that that part well this part So if I wanted to checkmark-circle Copy checkmark-circle And I would Sorry in here Simply [00:46:02](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m02s) The icon Change that to checkmark-circle Ok So that's how you change the icon And then these are Simply the ID's Of the fields I want Inside of the repeatable field Ok And so if I was to [00:46:22](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m22s) Show you where to get the ID It simply would be close close your Repeatable field And you'd see the ID is next to the fields there on the right So you would create The the Repeatable field that you o sorry The fields that you wanna use in the repeatable field And you would get a list of those ID's jotted down so maybe somewhere a Notepad or something Just add them in the [00:46:51](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m51s) In the order that you want them to be Added And then inside of your repeatable field You would simply Pasted in the fields Area with a comma separating them And then component builder will Dynamically Construct this whole structure For you [00:47:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m11s) And add it To your Component I think it's really Stunning and I hope you enjoy using the repeatable fields Structure I know it's little buggy still and there's a lot of talk about it not being as Stable But you're more normal basic Fields like text Fields and radio Buttons and so forth they all work Well now the only thing about the radio buttons that use that you use in [00:47:39](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m39s) In the in the in the repeatable fields You need to remove the class Of your radio button So It cannot be a button It must be a dot Unfortunately it still they don't Yet make it possible to actually load the button Now what's the difference [00:47:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m59s) Well the difference is let me see if I can quickly show you That is the button version Of a radio button Ok And That is the Dot version Of the radio button And it doesn't look like a button [00:48:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m20s) And so in your repeatable Fields you cannot use the button version It needs to be this one And what makes it a button is obviously the class That is Being added to the field So you need to remove the class uh Values From your radio button If it's gonna be used in the [00:48:38](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m38s) Repeatable field But anyway if you forgot To do that and you compile your component And now you looking at the repeatable field you'll see that the radio button is You know that it's not working That it is messed up Until they possibly fix it This is unfortunately the case Ok that is looking at advanced field [00:49:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m04s) Sorry fields called custom Fields custom user fields As well as repeatable fields These are really the advanced field types that there are The other thing that I wanted briefly mentioned let me see how long if we already been At this Ok see this is getting a little long So Let's move What I wanted to share to a later topic [00:49:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m27s) Thank you for watching +Another one we need to look at is the repeatable fields. Repeatable fields is actually not that difficult but you need to understand how it's structured. You need to first create the fields that you want to repeat inside of repeatable fields. The way repeatable field structure looks [00:40:55](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m55s) in Joomla, I mean when we look at it in the actual application. Let me see where did I used a repeatable field. OK here we have one. So this from there all the way to there(see video) is one repeatable field. And if you know a little XML and you worked with repeatable fields, you'll see that [00:41:23](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m23s) here is the the fields that are being repeated inside of the repeatable field. Repeatable field is a field type that has other fields inside of it. Now you don't need to write any of this. The way you would structure a repeatable field is very simple. [00:41:47](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m47s) You first create the fields that you want to repeat. And do realize you can't use repeatable fields in repeatable fields. But you can use custom advanced fields in repeatable fields. + +So if you look at that we have here again you see there is a field type called: 'cause and risks'. If you know Joomla you would know there is no such field type 'cause and risks'. So that means this is a custom field. If I were to go to fields, [00:42:16](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m16s) you will see there is a field called 'cause and risks'. And it gets it information from this database table. This is another component that I've done with component builder. And it is [00:42:35](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m35s) displaying those data. Also making some model changes to the data. And adding some style to it. Nonbreaking space and stuff like that. That is just dealing with the cause and risks. + +So looking again at our repeatable field you're able to add an advance custom field inside of it. [00:43:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m00s) But what you need to add it, is let's open females for our example as you need to have the field ID And you need to order it according to the order you want to displayed in the Line [00:43:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m17s) Where you do repeatable fields So if we If we close here and then we go back to Creating a new admin view and I click on fields You see that there is 1 2 3 4 5 6 7 8 9 10 11 12 13 Fields In one row And if I click next and they all appear again [00:43:43](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m43s) And if I click next they all appear again And that's what repeatable Fields really is about Now this structure these Fields if we Would you look at it how did I develop This specific Pop-up Repeatable Structure well I can show that to you Here is a list of all the repeatable fields that I've already built This three pages of 20 [00:44:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m08s) If we were to click on add Files No wait we were lookingat add Fileds let's see add fields add fields There it is addfields for views Open that So this is the repeatable field for adding fields for Views And all you see here as I'm saying ok you could add 800 fields it way over kill But ok [00:44:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m37s) And we call him the button Add So if we go back to the view See it says add And then I'm adding an ID in a class to it A description which if we were to hover over it Here It has a little setup fields for this view Which is the description [00:44:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m59s) Same there see And the label is fields So it says There fields And Then the icon is list Now the icon Is what is shown in the button That is a list All the custom Joomla icons [00:45:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m17s) are You can can be used How to know these icons you should go to let me see There is a URL Docs.joomla.org / J3.x: Joomla_Standard_Icomoon_ fonds there you go That is the URL And you'll get to this page [00:45:41](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m41s) And These are all the available icons And you basically use that that part well this part So if I wanted to checkmark-circle Copy checkmark-circle And I would Sorry in here Simply [00:46:02](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m02s) The icon Change that to checkmark-circle Ok So that's how you change the icon And then these are Simply the ID's Of the fields I want Inside of the repeatable field Ok And so if I was to [00:46:22](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m22s) Show you where to get the ID It simply would be close close your Repeatable field And you'd see the ID is next to the fields there on the right So you would create The the Repeatable field that you o sorry The fields that you wanna use in the repeatable field And you would get a list of those ID's jotted down so maybe somewhere a Notepad or something Just add them in the [00:46:51](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m51s) In the order that you want them to be Added And then inside of your repeatable field You would simply Pasted in the fields Area with a comma separating them And then component builder will Dynamically Construct this whole structure For you [00:47:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m11s) And add it To your Component I think it's really Stunning and I hope you enjoy using the repeatable fields Structure I know it's little buggy still and there's a lot of talk about it not being as Stable But you're more normal basic Fields like text Fields and radio Buttons and so forth they all work Well now the only thing about the radio buttons that use that you use in [00:47:39](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m39s) In the in the in the repeatable fields You need to remove the class Of your radio button So It cannot be a button It must be a dot Unfortunately it still they don't Yet make it possible to actually load the button Now what's the difference [00:47:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m59s) Well the difference is let me see if I can quickly show you That is the button version Of a radio button Ok And That is the Dot version Of the radio button And it doesn't look like a button [00:48:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m20s) And so in your repeatable Fields you cannot use the button version It needs to be this one And what makes it a button is obviously the class That is Being added to the field So you need to remove the class uh Values From your radio button If it's gonna be used in the [00:48:38](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m38s) Repeatable field But anyway if you forgot To do that and you compile your component And now you looking at the repeatable field you'll see that the radio button is You know that it's not working That it is messed up Until they possibly fix it This is unfortunately the case Ok that is looking at advanced field [00:49:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m04s) Sorry fields called custom Fields custom user fields As well as repeatable fields These are really the advanced field types that there are The other thing that I wanted briefly mentioned let me see how long if we already been At this Ok see this is getting a little long So Let's move What I wanted to share to a later topic [00:49:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m27s) Thank you for watching