From 6f39d52f693b08ff08e3721574d846d2b0b09c29 Mon Sep 17 00:00:00 2001 From: Joseph Geller Date: Fri, 23 Nov 2018 13:37:53 -0600 Subject: [PATCH] Updated 5. Field Types (markdown) --- 5.-Field-Types.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/5.-Field-Types.md b/5.-Field-Types.md index 70ac928..718c487 100644 --- a/5.-Field-Types.md +++ b/5.-Field-Types.md @@ -1 +1,14 @@ +# [Field Types](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE) ++ [01:05](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=1m5s) **Field types** _Create Field Types Using basic joomla article to explain field types and their relationship within views_ ++ [01:57](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=1m57s) **List view** _Difference between list view and edit view. Plural and single_ ++ [05:45](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=5m45s) **Compile error** _Remember to select correct options that suit your build._ ++ [06:35](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=6m35s) **Install compiled component** _Installing from within component builder, quick link_ ++ [08:04](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=8m4s) **Admin fields-views edit** _explanation of adding-editing fields_ ++ [09:26](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=9m26s) **Default field-types** _Default field-types that come shipped within Component_ ++ [12:29](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=12m29s) **Joomla standard form fields** _Joomla website for standards regarding form fields_ ++ [14:05](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=14m05s) **XML string format for joomla** _Reusable field types_ ++ [14:45](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=14m45s) **Text field type example** _Fields within Text field type_ ++ [15:15](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=15m15s) **Joomla XML example Text Field** _XML example_ ++ [17:43](https://youtu.be/OhLzvThDXls?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=17m43s) **XML string within compilier** _How XML string is build and compilied within component builder._ + If you have a good knowledge of dermalize API You will know that it has a means by which it builds it forms The forms that you use in your component And it's basically done through what is called the XML file Now I can show you that XML file but maybe this is Too Soon So all I'll tell you is that Component bolder basically builds that XML file And place it in in the right place So that your model View and controller Can access that file Through the double ifpi And with it builds the fields which you would use in a view So Need to define a few terms what is a view What is a field What is a component All those kind of things so We would like to start with what is known as field types There is always a field type needed If you are building a field Fuel types if we were to just go to Gmail ID self and maybe create a new article You basically this is what we would call a view In fact even there URL which I suppose you can't see Scroll down a bit there URL says that it's interview View = article Ok so This is an article View If you close this and you see a list of There's no articles here it's a blank website Then this is a list of articles and it's articles oral So did you create one it's article single And if it's the list of the articles it's plural Both of these are seen as views So this is the List View And if you click on you This is the What We would pour the edit view or the Single View So Your components mostly will have these two views in the backend When it comes to your different datasets Now This title here is what we would call it text for you Ble asir was also text you This editor block here it's what we would call there sorry not text View I'm in text field And this editor years also called a text editor field This is a List Field This is a radio Field another list field Another list field this is a tag field This is a text field And so you have all these fields This is a Date field This is a user field This is a text field Is a text Area Text area Text field List So I'm sorry we can continue this is a Normal text field but that's got a certain feature called Read only Added to it As you will see these things are all in place in our application For you to make use of all these different changes that can be made with one type of field So these are all seen as Fields and they all live inside a view So that's one concept that is quite important for you to realise That you have Fields with live in views now You might not think that the list view has Fields and you partly write it more displays these fields Let's do a dummy Best article year Hi I think that's about all I need to fill in save it close So we at least have a list item But that is also a field That is a field and if you to click on search options all these are fields And So your list you also has certain Fields which are primarily Only available in the listview and also the place where we do most of our Features for a multiple items where is opening one item Do what's only required for one item Ok and then there is obviously a table here which is part of the list of you now Component builder sets Up The Bucket List view and edit view for you Based on the fields and input value map them into your view We will look at each other's concepts More Deeply But I need to have you understand from which angle we are coming We are Gonna try and Show you That inside of This article You will be creating Fields even put them into different tabs Which will have been sleepy rendered in a specific order in Joomla in in the component when it's been Compiled through component component Builder S o That's using Dumas own Article manager is sort of an example But we could just as well Go onto component Builder Since it has the demo article sorry the demo application in it we can select the demo Compile it It says there is a coffee warning this is because we haven't set some options in the global settings It doesn't mean that there's been an error in the compiling it just means it couldn't move the file to the git repository You see we say we selected this get thing here And also that one If we've unselected those let's start again We answer like those and we only do a compile You see it doesn't give you the same warning Because he's not trying to move things around And since that I couldn't move the others because they are Global figures Settings that we haven't set We look at those in the moment So Now we could just click install And it is installed the component Into this Joomla site Nice you'll see it doesn't have any images because that we don't shift the images with the components Little sentence demo So Unfortunately at this stage we might change that in the future But you already have your demo component running If you click on add a loop It will open the edit you if you keep on looks It also pin a list view of where the looks will be displayed We added an import feature with your normal to Miller Components don't have We will explain that Later But if it new You see that we have a text to your hear a radio button if I Add something to the textfield it opens and alias field Also text field We have a repeatable field Near And we can add information to this And that is sort of Look at The fears that is in the demo component And so these are all fields And they are mapped into the component Through Gmail as infrastructure that If we go to Admin views There is Loop Open lock It has in it Those Fields we just looked at Right Is the name There is the earliest acronym all this information We just looked at And They are all mapped into the view Through the field at button here Reason why these two are Why you not adding in through this area is because this simply is to edit Existing Feels Instead of adding them So if you were to open a admin view you can edit them from here and it's maybe easier to get to the Today's Fields especially of God If you Have many components already You'll have many Fields and this is a way to Sort of just look at the fields related to this components Vue Ok so If you were to add more Fields you would open this box and this is where you'll be adding Fields I see we are missing One Possibly I need to Ensure that it's with the export and it's been I'll look at that Ok Now let's step back 2 Fuel types Because that's really where it all starts We've already at it All the field types that I think you would need The field types are Basically Map into the libraries inside of Joomla Joomla has many field types And for each field type which you build You need to sit Set certain values in an XML document These values Our free sample of use checkbox Set Up in Properties So You have these Be certain changing properties that you can adjust for it's Field So this is This is only the properties for The the checkbox field Now you might wonder if you need to set this and most of the time you would never need to do that unless you become You would want to add more field types which we haven't covered Or if you want to extend the existing field types But for the most part you would not probably need to You know Tinker with this I am simply trying to explain to you where Fuel type Comes from and Amazing Scalability that exists You see with most other component Builders you need to wait for the developer to add a new field type Where is this one you can add your own field type which simply needs to map to Djuma Lodge Library And the way that they have their field type set Now there are certain few types like repeatable field which is quite tricky and Needs special attention even in the code of the compiler But the majority of fuel types are very straight forward and simple to implement and we have implemented Tutos already We have not implemented all the attributes that can be targeted though And those would be the ones that you might need to come and add if you want to use them for example I added this show on Auction White recently to all field types which I found Because this is a way of showing and hiding Fields based on other Fields values And although we have a very excellent Application replace in component builder to take control of those Features Showing and hiding fields This is an added feature which you might self actually has and if we can and it component That we are developing if we can use show on instead of the component Builders version I would obviously suggest with me do that And none the less I would still explain much more on this topic as we continue So just Briefly let me start here at the top You have name which is called type And a value for checkbox And it Must be set to not adjustable because that is the way to Miller expected If you don't understand any of this information that I'm showing you here Then a place to go to Is this your l Let me open that for you It's called the form fields You see a whole list of form Fields and these are the same for all Fields you just saw In our application If I was to take Checkbox Up Your list checkbox Checkboxes Ox Ok if I was open that you'd see that they give you a list of those Fields type Name and I tell you what is mandatory And what is optional And basically we are just mapping those Data Into this 4 here And if we wanna add another attribute is click on the + and it creates a new field and we add the name at The value sweet peace which is in correspondence And some information This is really for yourself this information block here We put information there when later when you use this field type you are reminded what this specific at Rip And I I basically took this information Why Copying it right here from To my last website and placed it in there And where I felt there might be more said I added some customs text to it And what these values will do is it'll create an XML string like that In your form Which Joomla then uses to build those forms So Basically we first setup a fuel Type by Telling you Which input Values would be able to use for the specific field type which is the status Checkboxes And then we save this And then later you can reuse this fuel type when you start creating fields So let me just close this check box And go to text field And you'll see that you're is a List of the fields That used text field as its type Now you can open one of these fields And you're the bottom you see very something very similar if I was to go back here And go to text field Humorous website You see that it shows you examples of how that XML line should look right see Now Yeah In the Field area where you created to field Basically gave the few the name this is just for the system The name used here is the one that is important That should be the correct name the label This name is just that you when you add it to your view You know this is what we used to identify it Weston explain adding it to the view In more detail This diet data type and things were also explain we only go into more depth around What a field is and how to build one I'm simply now looking at few pipes and showing you how the changes that you've made in field type Effects I feel that you would build with that type So here is that Detail that was in field type Member on change And it tells you What is mandatory in what is optional but that's basically because I placed it in the description right I mean let's be country close to go back to that field type And then take on property And we'll see that I added optional and mandatory To the description So that I can know is this option or mandatory Yes you could Possibly argued that I should have done it from here and that it's not true don't be necessary to add it there But you know this is that this The settings here is used when we compile the component Where is this Here is used for you You know what this field attribute is all about And maybe as weak Continue to develop this component I might Make it changed to that But I wouldn't make such a change that it affects anything that already exists Dramatically and anyway Ok so let's go back to a field The way the compiler works it is doesn't really grab the string and just put it into the XML In fact if I show you how a string looks that the compiler is built Wrong window Let's go to the string that the compiler is built Assessment type You see that it is completely reformatted The label is turned into a translatable string So it's been done done with the description It also tells you where in the compiler if well we'll still look at that because this might Sometimes show and sometimes you can Tweak Your Your component that it doesn't show it But it tells you Europe in which line in the Compiler it was built and also in which file which is very nice I think those of you that are developers will appreciate this feature from tremendously I also tells you the fuel type so Obviously as you can see it as we scroll through this You can see that Component builder really goes way out of its way to Reconstruct That That field It is not using This directly It in fact Grabs That area And that To determine that this is a Text Field So it actually is really dependent on that part Which is up dude name come now And That part there So the opening Exclamation and the closing one And the value in between those is what is used So if you prefer by accident drop off this Or that it will still work perfectly These are really the only Things that are Really need it And part of what I am Hoping to achieve eventually is that this becomes just input Fields Like These And yet I'm wondering if I should go that way The fact that they all in one big text area Leaves us with a lot of room and freedom 2/2 really adjusted easily without major Complications And any case if you start a new field which we'll look at later It populates this with the demo demo data and the demo data Is actually values that you said When you create a fuel type You see Here it is the demo is this Value or example That is placed here It's from these values that region is in if you create a new text field It grabs these values as the values which you can then Adjust to your purpose Of you you know Implementation for that specific field at that moment If you leave it blank it will also build it without any value Between those two Estimation marks Ok That is looking at fuel types I'm not gonna spend much more time on this Primarily because all the field types has been set up And you hardly ever would need to come here on change things unless you really wanna do your own thing And then you will be able to do that without my help I suppose So I'll next tutorial will be on how to use field types in Fields Thank you for watching \ No newline at end of file