From a73685569542a9c6667c93b04fc2cc3db935c10b Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Wed, 22 May 2019 17:29:15 +0200 Subject: [PATCH] Updated 008 Advanced Fields (markdown) --- 008-Advanced-Fields.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/008-Advanced-Fields.md b/008-Advanced-Fields.md index e093bdf..9cf77e1 100644 --- a/008-Advanced-Fields.md +++ b/008-Advanced-Fields.md @@ -1,3 +1,15 @@ # ADVANCED FIELDS -Hi we've just finished with admin views and we would like to start looking at advanced field types now there are a few advanced field types and the one there Is most advanced is the one called custom field type so I'm gonna sort this Here by custom Fields it's that one And you see it in This moment we have quite a few custom fields in place [00:00:32](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m32s) Now let's look at two of those one is the local file List the other one is let's do a sermon sermon one but let's first look Look at the local file list you'd see that basically from there All the way down to there is simply PHP So I'm creating a view which is most basically Taking information if you know PHP from the global settings of your component so there need to be a field with a name local folder in your Global settings will still look at how to set up Global settings when we get to component and if it hasn't got a Setting it falls back onto the image which is in the Jpath root For your component this will be replaced with your component name and it puts it into local folder [00:01:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m36s) And then I just start the options and The options array which you gonna return and the first thing I add to it is a Please select a File add files oh yes if there isn't files It will say please add files to and it will give the local folder name if There is files we gonna update those then over here so first we bring in the File system classes from Joomla then we Basically check whether that folder exists and if it doesn't exist we create it That's just in the field type now once it's created and if it exists it obviously skips this doesn't go in there and it just starts by grabbing all the files And from that folder and place it into files and then start something array [00:02:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m40s) Where it Loops the files and put it into options and By doing that we are basically let me just check here and make sure we're adding the file name and the file name To our options array and then returning the options array so you can add your own custom PHP Scripting in the when you extend a listview so the list sorry list field were Extending list field so it's just gonna be a drop down list of all the files in that specific folder either images or the folder that it was set globally in local folder OK so that's your setting up a folder now there is a field type Called filelist I think Ya there it is the reason why I didn't Use filelist is because finalist has a static directory to where [00:03:44](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m44s) You need to add the files so that you can view them and we wanted To have it be able to rename the file folder sorry the folder For the files for the media do anything and then have it update itself automatically so that's why we then created a Custom field where we extended the list type and let me just refreshed this to get that Detail back so we chose a custom field and then We just extend the list type and we don't want it to have a You button because you it won't work you will just break and we don't want them to select Multiple oh yes we are allowing them to select multiple now since we are using multiple We need to go back and make sure that we are storing it as a Json so the Json is when have Multiple or erase any kind of arrays in a value you need to store it as a Json [00:04:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m48s) And the component builder itself will check if it is a multiple Selection is true it will automatically store it in a Json object even if you forgot to select this So we have got some things in place to sort of ensure that it's system Behaves as expected Ok let me see that's just quick view on Doing a local file custom field as a local file now Which I'm sure you all if you've been waiting for is let's look at how How to create a sermon preacher custom field so basically it's a Preacher custom field So what is this field gonna do it's gonna show a list of preachers But is gonna basically display the preachers that are set up in the preacher listview ok so let's Open that so let's see the convention [00:05:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m52s) Is that you would call that type preachers that's the listview name But you'd called the name you would use the same as the editing Name which is preacher without the s so if you go back to your admin views you would Use this name as the name of the field but you would use that name as the type You see because you now creating a custom type and the logic behind it is it it's gonna show A list of preachers but you gonna select just one preacher ok so that's just the logic the label You can really put whatever you like whatever is descriptive enough for your user to understand And then there's a place for adding a description then here we are set Multiple to false we want them to only be able to select one preacher at a time default zero these are all basically left to their default values and [00:06:56](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m56s) Extending list is the most common custom field that we have if you wanna Receive a list of custom Fields that is available you can go up here to extend and you see that list Radio and check boxes are available I think I should update that too also say users User is also a user option to extend users If you want to see if we are what is available then look at that name Jform field and go to component builder go to the Back end of component builder so that would be administrator components component builder Then go to compiler that's a folder then go to Joomla 3 Which is the current version we are targeting and then search for that Jform there's it is Jform so [00:08:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m00s) Ones that are available to extend let's see it's the user Jform field user you must it must Jform field So JForm field user Jform field radio Jform field list Jform field checkboxes this also means if there is a form field you Want to extend that doesn't exist already in our advanced Seminar will show you how to add your own form Fields here there is basically two places you need to Change I wish I could tell you now one of them would be to add the field and update it accordingly And the other one would be to add it in a few places in the code And also in a Jason file called settings there so those are Some of the things we will deal with in advanced adaptation of component Builder [00:09:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m04s) We will still set up that series very soon it's not finished yet though ok Getting back to extending a listview sorry listfield you Simply There list ok then there's also a few conventions one of them being that if you are gonna be targeting like this Example we are targeting the preachers you will be using the preacher Table as the table that is being targeted so the question to ask Is where is the data gonna be found that is the table That needs to be added in which component is it gonna be found and that is what need to be added by component now the reason why we have this hash hash hash component here Because it's a placeholder which component builder will replace with the components code name [00:10:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m08s) Once it's built it's a It's a feature we add it because some times We want to rename components and if you had statically added The actual component name there then you have to and every field go and update that name and in every view go and update that name and you know every where were you actually statically the added the component's name You will need to update it but to explain to you exactly what the system Is doing I can go to components open sermon distributor And then take the name a in code like that copy And see that it's under underscore C if it was an uppercase sorry not Underscore lowercase if it was a uppercase like that it mean It would mean that you have to place this the component [00:11:12](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s) Name as well with an uppercase so you would do just a s lowercase so that is actually what the system is doing it actually is Just replacing these these Place holders with the with the actual component name on Fly so using the placeholders basically saves you time in the long run Prompt making changes everywhere if you make a change to components name Which is quite normal to do very often you start with the component in his think of calling it something and later Realized that name is actually been used in the Joomla repository and you need to choose another And to do that is gonna affect the whole component and so we added this Placeholder structure which should make a data less painful at least anywhere in all the code custom coding that you're adding and you need to use the components name [00:12:16](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m16s) You can simply use this hash tag format of replacement In some areas you would need to use brackets like that But most of the time it will work either way the best Measure to to ensure is to try it with a hash's is first and If you go into the code and you see it didn't replace it then you know it's the angle brackets that needs to be used anyway so in this case we are using these hash hash signs symbols sorry characters and then the view again that is this Single variable of the view so if we were to close this and go to the view Which would be then preacher or lowercase Is what you would be adding here make sure that it's always lowercase [00:13:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m20s) And then the listview or the views plural would be The add value there or lowercase as well and then the value field Is the field that the user will see so that is what is visible in the UI user interface the key field is the Value that will be stored in the database now these field relate to this table so in Inside the table what field do you want the user to see now that would be the name of the preacher And inside the table What field would you want to store In the other database because we are looking into preacher but we gonna store it Wherever this field is being used right so that would be the ID and The column name in that data base of that view where this field will be used will be called [00:14:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m24s) Preacher so to show that to you in the database itself can open it there Scroll down to sermon distributor open sermons click on structure and here in the back end let's close this go to Sermons new And we will see that there is a place for preacher If I was to look with firebug for it we'll see that it is basically The name is preacher and remember we spoke about this J4_ as the ID But it's actually Simply the preacher field which is being stored directly in In the database in the preacher [00:15:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m28s) Column of the table and it's stored as integer 11 and that It was set up here right integer 11 and we say that it is a key so we can Target it So here at the bottom if we look at in indexes we'll see that it Has actually added it is a key and we go ok so that All is done right here in the database structure and then in this area Now again in this part which you can add your own custom PHP The fact that I'm using 19 18 17 it's just sort of creating Line breaks and spacing and tabs for me dynamically I could have placed them All just under PHP one with without this Quotation marks you know [00:16:32](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m32s) Wrapping around them all like we just did with the file folder list View Just a note inside of this code you cannot These quotation marks you need to Use single quotes unfortunately at this stage it is not able to accommodate you even if you try to do an Escape it will not behave as it's as you might expect So my apologies for that at this stage you can only do single Quotes between these two quotations...double quotes Ok so that is adding a custom field which is a little bit more advanced If you know PHP you will know exactly what's happening here again these Place holders reflect back to these values here so basically A dot ID will be written there [00:17:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m36s) and the Text value which is the field value is gonna be called a dot name Name and then ID and code text this code Is build-up by the view that we are in and the text so this would read Preacher sorry sermon preacher in in in the code and in fact I can go show you how it looks when it builds it it's quickly look at that So the show you where it starts let's open that Field list so that is what it starts with basically it replaces this place holder With your code ok and it replaces all these features Up here as well And updates that and [00:18:30](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m30s) So every where you see these things It's gonna be updated through component builder And obviously everything up here will be replaced with your licensing tags . Then now let's look at the Finished product Sermon it's placed on the modules field and there it is preachers Open it [00:18:57](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m57s) You see that it added preacher there And in the input Add it and it also shows you Where if you had trip that switch like we have explained to show the line numbers in your component It shows you in what file These files are found Under The [00:19:15](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m15s) You go to component builder under helper's Compiler there are these files that is Being used to compile your component . I'll possibly when we go to the advanced section I'll go much more in-depth in Regards to These files Now we just trying to get across how to build a component [00:19:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m40s) Not to extend Builder itself as yet But at least here you can see where in the code it is actually building this and compiling this and Putting it together And Remember we talked about It's it's Getting The structure let's [00:19:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m59s) Go down this is used for the button This is to generate a new button when you Can click on new Basically that is the Button there ....this area from there to There is generating the button This is what controls whether the button should show up or whether it shouldn't then [00:20:21](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m21s) And even if it is to be set at all Ok so this is basically what generates the button...this area This area here the get options You see we said that it will show the name And it will show ID And so Go back to our Structure here It basically we dynamically replaces these with those The reason for it is it's actually done a few times [00:20:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m48s) And I felt like ok let's let's make it that you only need to update these values And then if you get update gets updated all over in the Bottom of the code And it makes it just much more easy to To change your custom Fields So it Build a field called preacher name Which again it uses here as a object value Because it [00:21:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m17s) Retrieves the object From the database and it looks as if that object exists it actually reiterates And builds up option list Which is returned to use in the drop down So it dynamically generates your list and so component builder through that infrastructure through what I [00:21:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m37s) Just explained here Actually compiles all of that code for you And puts it in the right file in the right place and all of that And obviously once you build a component and you know where you have made those changes in Builder You can go look at those files If you know how to build a Joomla website I used the same conventions as decor In regards to implementation Of your files [00:22:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m07s) Ok At the moment we are only pulling values that are published This is what it is all about That is the custom fields I feel like I am Maybe just Mumbling on without purpose so let's get out of this one I think we can quickly look At this One which is this manual file list [00:22:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m36s) Dropbox This one is much more advanced What we are dealing with here Is a file That actually Is stored if I look here in it What I did is I created a function in my component Global helper function Called get Dropbox links it tells it that it [00:23:02](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) wants manual links And it passes a Specific variable 2 And it would return a bunch of links And those links it will check if it exists Check the array not only that it is an array but it actually has values in it And if it does it actually just backs it into the Options [00:23:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m24s) And gives it Over to The options array to the list Now This part here Means that you can in your Custom field types You can add a helper Static Method call [00:23:44](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m44s) If you know what those two symbols there mean It means it's a static method Being called From a class Now this class is something that if you know the Joomla API and know how to work builder component You will know that You can add to any component what is known as a Component Helper class Now [00:24:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m07s) If I was to go to summon distributor The component helper class is always Located In The helper Folder of The admin as well as the site View The admin is then in the back end in which Administrative components And then [00:24:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m28s) There is the component And there is it's helper Folder And the front end you have the same convention componant sermon distributer And there is the helper Structure Ok and here is some of the [00:24:49](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m49s) Java Script the Components sorry which sermon distributor structures Through it's helper structure There is the Helper file for the front And here helper file For the back How to add methods [00:25:09](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m09s) Do they already Helper files Have you don't want to know what all the custom helpers is That we ship With all components You can open component Builder You can go to the compiler Sorry compiler not controller Go to Joomla 3 And then look for the helper file in the site helper file [00:25:30](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m30s) If you open it You see whole lot of helper methods obviously with a lot of Place holders Which we will Customised for each Component so that it Targets that component And you see there's a Json to string method here that's to get bars there's a get bar singular This is just to get one variable from the database we don't need to always to rewrite . [00:25:55](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m55s) This whole string To get just one variable You can actually come and Look at how this works and use this To get a variable from the database We also have is published to Check if a Specific Object is published I get actions [00:26:14](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m14s) But again This is way beyond the scope of Just looking at custom Fields We will go into great depth into all the features of a helper structures That when we deal with advanced concepts But I'm just giving you a heads up so at least you can start looking at it and Possibly get yourself going We are I wrote these Functions check object check array check string [00:26:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m40s) Check Json Shorten Merge arrays Save string And Escape HTML Replace numbers this one I'm using quite often You know if you basically do Save string [00:26:58](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m58s) We change every number in the string immediately to Text So that you can be sure whatever you get back from safe string Doesn't have numbers in it This is sometimes quite necessary in fact All the time Especially if you don't know if there might be a number is that First Character might be a number [00:27:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m20s) This way we are insuring that it Always It's actually text Ok so there is just a whole bunch of Custom Methods that we ship With all components that are developed so if you were to Open Like I have said Sermon Distributors [00:27:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m40s) Custom Sorry Helper class You see that these helper classes are now all Showing up here get actions Shorten string merge array So you can come and any of you feel that the methods that I have to used here is archaic or Outdated [00:28:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m00s) Please go on the forums at Github and talk with me about it All very gladly look at it and see I know I recently tried to improve on this check String By doing That So I could actually dump The part and Save on [00:28:22](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m22s) the Query But For some strange reason This started Causing problems All over and strings that were strings were being returned as not being strings But what I can tell you is that I Obviously [00:28:41](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m41s) Went back to the old School way of doing it which is This way I don't know There might be an easier way Obviously we first one to ensure That it's set That actually This value is set And then it is string and then it actually has a length you see something can be a string and yet don't have a length [00:29:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m04s) I might be wrong on that and yet this is what I found I've only been coding and PSP for 3 years now so I'm definitely You get teach me a few things You been at it longer than I am Ok Back to the UI That is where I get these values so showing it to you In here Go up a bit [00:29:29](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m29s) Says get Dropbox links C Now We see that Has this thing of return Which is set to false Now that means if I only was to say That it should return the manual Values Then it will only return the value manual links But since I've said it [00:29:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m52s) to 2 It will actually return all of those links and not just One of them Ok so because you can actually target that it returns One specific sermons link So this method is Quite dynamic And that's all that I'm calling In in this Advanced [00:30:15](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m15s) Field type Which is called custom field And it gives me a link of all the Sorry an array of all the links Which I didn't just load like I have explained Ok so that is again as you can see quite Advanced implementation of this Custom fields And Obviously [00:30:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m37s) As you As I hope you would realize Is there you can do anything You can with that list conception You could even grab a bunch of website names from somewhere You can put any PHP in there and build a list which can be used To save to the database Ok let's see that would be the custom Custom Fields there's also one called custom user Now the custom user at the moment it 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 So I just click on new And then select Custom user And You'd see that the custom user basically You don't need to set or changed 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 parted you might want to consider removing Would be The PHP This part here Basically what this part does Is it limits the 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 your Global remember we talked about that previously Basically 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 said Global these are all Global values this is a Area for Global Values Now You can get hold of those Global values through the component helper Getparams with a component Name And get When there you would place the field name [00:32:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s) So 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 And then I am Returning that group that's all this part is doing In fact 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) Ok I wanna just return a specific group This part Helps you Set Any users you want to exclude Now this specific feature here Ensures that only one record per user is set so 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 So this is what this PHP is doing It's simply looking to this current View And checking if the 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) So Those are the users that already have So if you are building something Which are supposed to To have Student details for example You don't want a Student to have more than one Entry in that table right You want every student to just have one in [00:33:58](https://www.youtube.com/watch?v=VpzYbifqv0M&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 Actually does How to show that to you in the code Let's go to Another project that I am Working on called learning manager and modules And they have a Field Called student Student users and user [00:34:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m27s) Now There are two kinds of Ways to To do this One is to not Allow more than one user To have an entry And then you would basically The one is saying ok 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 Actually 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 Of your Of the code Then it will automatically set This value to null Now 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 it will also be set to null like That And component builder will do that And all you need to do is simply remove What is part of the code And then it will actually And so That is true 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 So 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 on the Type phpx [00:36:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m11s) So you could do like That type phpx1= All your PHP can be placed for excluding And For the group It's simply sorry not Directly one [00:36:33](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m33s) You can just Take that And This one will be used For the groups that actually says it there Getexcluded method PHP for the get group And in the code Which is stored under Fields models You see what it will do so 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 actually 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 ok so 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 +Hi we've just finished with admin views and we would like to start looking at advanced field types. There are a few advanced field types and the one there is most advanced, it is the one called custom field type. I'm going to sort this here by custom fields. It's that one(custom). And you will see it in this moment we have quite a few custom fields in place. [00:00:32](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m32s) + +**Local File List Example** + +Now let's look at two of those. One is the local(file list), the other one is the sermon one. But let's first look at the local(file list). You'd see that basically from there(XML field definition). All the way down to there is simply PHP. So I'm creating a view which is most basically. Taking information if you know PHP, from the global settings of your component so there need to be a field with a name 'localfolder' in your global settings. We will still look at how to set up global settings when we get to component. If it hasn't got a setting it falls back onto the image which is in the 'JPATH ROOT'. For your component this will be replaced with your component name. And it puts it into local folder. [00:01:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m36s) Then I just start the options array, which you going to return and the first thing I add to it is a Please select a File add files oh yes if there isn't files It will say please add files to and it will give the local folder name if There is files we gonna update those then over here so first we bring in the File system classes from Joomla then we Basically check whether that folder exists and if it doesn't exist we create it That's just in the field type now once it's created and if it exists it obviously skips this doesn't go in there and it just starts by grabbing all the files And from that folder and place it into files and then start something array [00:02:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m40s) Where it Loops the files and put it into options and By doing that we are basically let me just check here and make sure we're adding the file name and the file name To our options array and then returning the options array so you can add your own custom PHP Scripting in the when you extend a listview so the list sorry list field were Extending list field so it's just gonna be a drop down list of all the files in that specific folder either images or the folder that it was set globally in local folder OK so that's your setting up a folder now there is a field type Called filelist I think Ya there it is the reason why I didn't Use filelist is because finalist has a static directory to where [00:03:44](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m44s) You need to add the files so that you can view them and we wanted To have it be able to rename the file folder sorry the folder For the files for the media do anything and then have it update itself automatically so that's why we then created a Custom field where we extended the list type and let me just refreshed this to get that Detail back so we chose a custom field and then We just extend the list type and we don't want it to have a You button because you it won't work you will just break and we don't want them to select Multiple oh yes we are allowing them to select multiple now since we are using multiple We need to go back and make sure that we are storing it as a Json so the Json is when have Multiple or erase any kind of arrays in a value you need to store it as a Json [00:04:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m48s) And the component builder itself will check if it is a multiple Selection is true it will automatically store it in a Json object even if you forgot to select this So we have got some things in place to sort of ensure that it's system behaves as expected Ok let me see that's just quick view on Doing a local file custom field as a local file now Which I'm sure you all if you've been waiting for is. + +**Sermon Preacher Custom Field** + +Let's look at how How to create a sermon preacher custom field so basically it's a Preacher custom field So what is this field gonna do it's gonna show a list of preachers But is gonna basically display the preachers that are set up in the preacher list view. so let's open that so let's see the convention [00:05:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m52s) Is that you would call that type preachers that's the list view name But you'd called the name you would use the same as the editing Name which is preacher without the s so if you go back to your admin views you would Use this name as the name of the field but you would use that name as the type You see because you now creating a custom type and the logic behind it is it it's gonna show A list of preachers but you gonna select just one preacher ok so that's just the logic the label You can really put whatever you like whatever is descriptive enough for your user to understand And then there's a place for adding a description then here we are set Multiple to false we want them to only be able to select one preacher at a time default zero these are all basically left to their default values and [00:06:56](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m56s) Extending list is the most common custom field that we have if you wanna Receive a list of custom Fields that is available you can go up here to extend and you see that list Radio and check boxes are available I think I should update that too also say users User is also a user option to extend users If you want to see if we are what is available then look at that name Jform field and go to component builder go to the Back end of component builder so that would be administrator components component builder Then go to compiler that's a folder then go to Joomla 3 Which is the current version we are targeting and then search for that Jform there's it is Jform. + +**Jform in Component Builder** + +so [00:08:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m00s) Ones that are available to extend let's see it's the user Jform field user you must it must Jform field So JForm field user Jform field radio Jform field list Jform field checkboxes this also means if there is a form field you Want to extend that doesn't exist already in our advanced Seminar will show you how to add your own form Fields here there is basically two places you need to Change I wish I could tell you now one of them would be to add the field and update it accordingly And the other one would be to add it in a few places in the code And also in a Jason file called settings there so those are Some of the things we will deal with in advanced adaptation of component Builder [00:09:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m04s) We will still set up that series very soon it's not finished yet though ok Getting back to extending a list view sorry list field you Simply There list ok then there's also a few conventions one of them being that if you are gonna be targeting like this Example we are targeting the preachers you will be using the preacher Table as the table that is being targeted so the question to ask Is where is the data gonna be found that is the table That needs to be added in which component is it gonna be found and that is what need to be added by component now the reason why we have this hash hash hash component here Because it's a placeholder which component builder will replace with the components code name [00:10:08](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m08s) Once it's built it's a It's a feature we add it because some times We want to rename components and if you had statically added The actual component name there then you have to and every field go and update that name and in every view go and update that name and you know every where were you actually statically the added the component's name You will need to update it but to explain to you exactly what the system Is doing I can go to components open sermon distributor And then take the name a in code like that copy And see that it's under underscore C if it was an uppercase sorry not Underscore lowercase if it was a uppercase like that it mean It would mean that you have to place this the component [00:11:12](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m12s) Name as well with an uppercase so you would do just a s lowercase so that is actually what the system is doing it actually is Just replacing these these Place holders with the with the actual component name on Fly so using the placeholders basically saves you time in the long run Prompt making changes everywhere if you make a change to components name Which is quite normal to do very often you start with the component in his think of calling it something and later Realized that name is actually been used in the Joomla repository and you need to choose another And to do that is gonna affect the whole component and so we added this Placeholder structure which should make a data less painful at least anywhere in all the code custom coding that you're adding and you need to use the components name [00:12:16](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m16s) You can simply use this hash tag format of replacement In some areas you would need to use brackets like that But most of the time it will work either way the best Measure to to ensure is to try it with a hash's is first and If you go into the code and you see it didn't replace it then you know it's the angle brackets that needs to be used anyway so in this case we are using these hash hash signs symbols sorry characters and then the view again that is this Single variable of the view so if we were to close this and go to the view Which would be then preacher or lowercase Is what you would be adding here make sure that it's always lowercase [00:13:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m20s) And then the listview or the views plural would be The add value there or lowercase as well and then the value field Is the field that the user will see so that is what is visible in the UI user interface the key field is the Value that will be stored in the database now these field relate to this table so in Inside the table what field do you want the user to see now that would be the name of the preacher And inside the table What field would you want to store In the other database because we are looking into preacher but we gonna store it Wherever this field is being used right so that would be the ID and The column name in that data base of that view where this field will be used will be called [00:14:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m24s) Preacher so to show that to you in the database itself can open it there Scroll down to sermon distributor open sermons click on structure and here in the back end let's close this go to Sermons new And we will see that there is a place for preacher If I was to look with firebug for it we'll see that it is basically The name is preacher and remember we spoke about this J4_ as the ID But it's actually Simply the preacher field which is being stored directly in In the database in the preacher [00:15:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m28s) Column of the table and it's stored as integer 11 and that It was set up here right integer 11 and we say that it is a key so we can Target it So here at the bottom if we look at in indexes we'll see that it Has actually added it is a key and we go ok so that All is done right here in the database structure and then in this area Now again in this part which you can add your own custom PHP The fact that I'm using 19 18 17 it's just sort of creating Line breaks and spacing and tabs for me dynamically I could have placed them All just under PHP one with without this Quotation marks you know [00:16:32](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m32s) Wrapping around them all like we just did with the file folder list View Just a note inside of this code you cannot These quotation marks you need to Use single quotes unfortunately at this stage it is not able to accommodate you even if you try to do an Escape it will not behave as it's as you might expect So my apologies for that at this stage you can only do single Quotes between these two quotations...double quotes Ok so that is adding a custom field which is a little bit more advanced If you know PHP you will know exactly what's happening here again these Place holders reflect back to these values here so basically A dot ID will be written there [00:17:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m36s) and the Text value which is the field value is gonna be called a dot name Name and then ID and code text this code Is build-up by the view that we are in and the text so this would read Preacher sorry sermon preacher in in in the code and in fact I can go show you how it looks when it builds it it's quickly look at that So the show you where it starts let's open that Field list so that is what it starts with basically it replaces this place holder With your code ok and it replaces all these features Up here as well And updates that and [00:18:30](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m30s) So every where you see these things It's gonna be updated through component builder And obviously everything up here will be replaced with your licensing tags . Then now let's look at the Finished product Sermon it's placed on the modules field and there it is preachers Open it [00:18:57](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m57s) You see that it added preacher there And in the input Add it and it also shows you Where if you had trip that switch like we have explained to show the line numbers in your component It shows you in what file These files are found Under The [00:19:15](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m15s) You go to component builder under helper's Compiler there are these files that is Being used to compile your component . I'll possibly when we go to the advanced section I'll go much more in-depth in Regards to These files Now we just trying to get across how to build a component [00:19:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m40s) Not to extend Builder itself as yet But at least here you can see where in the code it is actually building this and compiling this and Putting it together And Remember we talked about It's it's Getting The structure let's [00:19:59](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m59s) Go down this is used for the button This is to generate a new button when you Can click on new Basically that is the Button there ....this area from there to There is generating the button This is what controls whether the button should show up or whether it shouldn't then [00:20:21](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m21s) And even if it is to be set at all Ok so this is basically what generates the button...this area This area here the get options You see we said that it will show the name And it will show ID And so Go back to our Structure here It basically we dynamically replaces these with those The reason for it is it's actually done a few times [00:20:48](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m48s) And I felt like ok let's let's make it that you only need to update these values And then if you get update gets updated all over in the Bottom of the code And it makes it just much more easy to To change your custom Fields So it Build a field called preacher name Which again it uses here as a object value Because it [00:21:17](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m17s) Retrieves the object From the database and it looks as if that object exists it actually reiterates And builds up option list Which is returned to use in the drop down So it dynamically generates your list and so component builder through that infrastructure through what I [00:21:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m37s) Just explained here Actually compiles all of that code for you And puts it in the right file in the right place and all of that And obviously once you build a component and you know where you have made those changes in Builder You can go look at those files If you know how to build a Joomla website I used the same conventions as decor In regards to implementation Of your files [00:22:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m07s) Ok At the moment we are only pulling values that are published This is what it is all about That is the custom fields I feel like I am Maybe just Mumbling on without purpose so let's get out of this one I think we can quickly look At this One which is this manual file list [00:22:36](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m36s) Dropbox This one is much more advanced What we are dealing with here Is a file That actually Is stored if I look here in it What I did is I created a function in my component Global helper function Called get Dropbox links it tells it that it [00:23:02](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) wants manual links And it passes a Specific variable 2 And it would return a bunch of links And those links it will check if it exists Check the array not only that it is an array but it actually has values in it And if it does it actually just backs it into the Options [00:23:24](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m24s) And gives it Over to The options array to the list Now This part here Means that you can in your Custom field types You can add a helper Static Method call [00:23:44](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m44s) If you know what those two symbols there mean It means it's a static method Being called From a class Now this class is something that if you know the Joomla API and know how to work builder component You will know that You can add to any component what is known as a Component Helper class Now [00:24:07](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m07s) If I was to go to summon distributor The component helper class is always Located In The helper Folder of The admin as well as the site View The admin is then in the back end in which Administrative components And then [00:24:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m28s) There is the component And there is it's helper Folder And the front end you have the same convention componant sermon distributer And there is the helper Structure Ok and here is some of the [00:24:49](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m49s) Java Script the Components sorry which sermon distributor structures Through it's helper structure There is the Helper file for the front And here helper file For the back How to add methods [00:25:09](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m09s) Do they already Helper files Have you don't want to know what all the custom helpers is That we ship With all components You can open component Builder You can go to the compiler Sorry compiler not controller Go to Joomla 3 And then look for the helper file in the site helper file [00:25:30](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m30s) If you open it You see whole lot of helper methods obviously with a lot of Place holders Which we will Customised for each Component so that it Targets that component And you see there's a Json to string method here that's to get bars there's a get bar singular This is just to get one variable from the database we don't need to always to rewrite . [00:25:55](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m55s) This whole string To get just one variable You can actually come and Look at how this works and use this To get a variable from the database We also have is published to Check if a Specific Object is published I get actions [00:26:14](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m14s) But again This is way beyond the scope of Just looking at custom Fields We will go into great depth into all the features of a helper structures That when we deal with advanced concepts But I'm just giving you a heads up so at least you can start looking at it and Possibly get yourself going We are I wrote these Functions check object check array check string [00:26:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m40s) Check Json Shorten Merge arrays Save string And Escape HTML Replace numbers this one I'm using quite often You know if you basically do Save string [00:26:58](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m58s) We change every number in the string immediately to Text So that you can be sure whatever you get back from safe string Doesn't have numbers in it This is sometimes quite necessary in fact All the time Especially if you don't know if there might be a number is that First Character might be a number [00:27:20](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m20s) This way we are insuring that it Always It's actually text Ok so there is just a whole bunch of Custom Methods that we ship With all components that are developed so if you were to Open Like I have said Sermon Distributors [00:27:40](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m40s) Custom Sorry Helper class You see that these helper classes are now all Showing up here get actions Shorten string merge array So you can come and any of you feel that the methods that I have to used here is archaic or Outdated [00:28:00](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m00s) Please go on the forums at Github and talk with me about it All very gladly look at it and see I know I recently tried to improve on this check String By doing That So I could actually dump The part and Save on [00:28:22](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m22s) the Query But For some strange reason This started Causing problems All over and strings that were strings were being returned as not being strings But what I can tell you is that I Obviously [00:28:41](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m41s) Went back to the old School way of doing it which is This way I don't know There might be an easier way Obviously we first one to ensure That it's set That actually This value is set And then it is string and then it actually has a length you see something can be a string and yet don't have a length [00:29:04](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m04s) I might be wrong on that and yet this is what I found I've only been coding and PSP for 3 years now so I'm definitely You get teach me a few things You been at it longer than I am Ok Back to the UI That is where I get these values so showing it to you In here Go up a bit [00:29:29](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m29s) Says get Dropbox links C Now We see that Has this thing of return Which is set to false Now that means if I only was to say That it should return the manual Values Then it will only return the value manual links But since I've said it [00:29:52](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m52s) to 2 It will actually return all of those links and not just One of them Ok so because you can actually target that it returns One specific sermons link So this method is Quite dynamic And that's all that I'm calling In in this Advanced [00:30:15](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m15s) Field type Which is called custom field And it gives me a link of all the Sorry an array of all the links Which I didn't just load like I have explained Ok so that is again as you can see quite Advanced implementation of this Custom fields And Obviously [00:30:37](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m37s) As you As I hope you would realize Is there you can do anything You can with that list conception You could even grab a bunch of website names from somewhere You can put any PHP in there and build a list which can be used To save to the database Ok let's see that would be the custom Custom Fields there's also one called custom user Now the custom user at the moment it 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 So I just click on new And then select Custom user And You'd see that the custom user basically You don't need to set or changed 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 parted you might want to consider removing Would be The PHP This part here Basically what this part does Is it limits the 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 your Global remember we talked about that previously Basically 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 said Global these are all Global values this is a Area for Global Values Now You can get hold of those Global values through the component helper Getparams with a component Name And get When there you would place the field name [00:32:28](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s) So 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 And then I am Returning that group that's all this part is doing In fact 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) Ok I wanna just return a specific group This part Helps you Set Any users you want to exclude Now this specific feature here Ensures that only one record per user is set so 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 So this is what this PHP is doing It's simply looking to this current View And checking if the 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) So Those are the users that already have So if you are building something Which are supposed to To have Student details for example You don't want a Student to have more than one Entry in that table right You want every student to just have one in [00:33:58](https://www.youtube.com/watch?v=VpzYbifqv0M&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 Actually does How to show that to you in the code Let's go to Another project that I am Working on called learning manager and modules And they have a Field Called student Student users and user [00:34:27](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m27s) Now There are two kinds of Ways to To do this One is to not Allow more than one user To have an entry And then you would basically The one is saying ok 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 Actually 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 Of your Of the code Then it will automatically set This value to null Now 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 it will also be set to null like That And component builder will do that And all you need to do is simply remove What is part of the code And then it will actually And so That is true 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 So 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 on the Type phpx [00:36:11](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m11s) So you could do like That type phpx1= All your PHP can be placed for excluding And For the group It's simply sorry not Directly one [00:36:33](https://www.youtube.com/watch?v=VpzYbifqv0M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m33s) You can just Take that And This one will be used For the groups that actually says it there Getexcluded method PHP for the get group And in the code Which is stored under Fields models You see what it will do so 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 actually 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 ok so 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