Updated 066 The new fields Area to make things easier (markdown)

Amigo 2019-10-01 10:51:15 +02:00
parent df1bc5bb10
commit ebbe0fe5a2

@ -17,22 +17,19 @@ Just a quick recap of how it used to look. If we go to an older install of JCB a
[00:01:55](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m55s)
What had been done? We removed this XML definition and we have replaced it with a sub-form. We've moved the database values to its own tabs. We also moved the field information to its own tab. We added a lot of structures and tools to the page. Let's show you that. Version 2.7.5 [00:02:28](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m28s) which is the stable release of this change. If we open that same Alias which we did just now, you will see it looks like this now(see video). You have a sub-form, with those values in a sub-form layout. You have a lot of new information. It also has the Database in its own tab. The Type Info is still available and you can still come and [00:02:58](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m58s) review. The new option still gives you the ability to add those fields which are not already on the page. You could still say I want to add 'size'. We still load the description of the field on the page in the default value, which you can then change. Except when it tells you that it must be text. We have not yet [00:03:31](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m31s) blocked this field from being changed or being removed, though it is mandatory. If you do leave it out on compiling, the component we will detect that it is mandatory. If you did not add value, it will fall back to its default value. [00:03:59](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s) That is how it currently behaves. I wouldn't develop it in that way, best practice is to put in the value and make sure that is correct. That is the new Field area. There have been some hiccups and [00:04:23](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m23s) bugs which we have ironed out the predominantly all those we know about. We also added this new option, we have not fully released some of the features but there is this option which is going to separate if you use the custom Field currently. It adds the PHP in the rows which [00:04:50](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m50s) is a little tedious if you want to change this to keep track of the open braces.<<<<<<<<<<
What had been done? We removed this XML definition and we have replaced it with a sub-form. We've moved the database values to its own tabs. We also moved the field information to its own tab. We added a lot of structures and tools to the page. Let's show you that. Version 2.7.5 [00:02:28](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m28s) which is the stable release of this change. If we open that same Alias which we did just now, you will see it looks like this now(see video). You have a sub-form, with those values in a sub-form layout. You have a lot of new information. It also has the Database in its own tab. The Type Info is still available and you can still come and [00:02:58](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m58s) review. The new option still gives you the ability to add those fields which are not already on the page. You could still say I want to add 'size'. We still load the description of the field on the page in the default value, which you can then change. Except when it tells you that it must be text. We have not yet [00:03:31](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m31s) blocked this field from being changed or being removed, though it is mandatory. If you do leave it out on compiling, the component we will detect that it is mandatory. If you did not add value, it will fall back to its default value. [00:03:59](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s) That is how it currently behaves. I wouldn't develop it in that way, best practice is to put in the value and make sure that is correct. That is the new Field area. There have been some hiccups and [00:04:23](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m23s) bugs which we have ironed out the predominantly all those we know about. We also added this new option, we have not fully released some of the features but there is this option which is going to separate if you use the custom Field currently. It adds the PHP in the rows which [00:04:50](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m50s) is a little tedious if you want to change this to keep track of the open braces.
### New Implemetation For Custom Fields and Custom User
[00:05:00](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m00s)
Just a little peek of what has been done. It will be in version 2.7.6. If you have watched this video after those releases you possibly already have it. Click on New, this is New implementation for the Custom Fields and also for Custom user. You click on it, it will take the PHP and adds it to its own little text area. Now you can easily follow and adapt the 'getOptions' method PHP values. That is [00:05:40](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m40s) quite more convenient I suppose than using one line at a time. If we look at the user, you have two fields then, one for he 'getExclude' method and one for the 'getGroup' method. They are also immediately available to you.
Just a little peek of what has been done. It will be in version 2.7.6. If you have watched this video after those releases you possibly already have it. Click on New, this is New implementation for the Custom Fields and also for Custom user. You click on it, it will take the PHP and adds it to its own little text area. Now you can easily follow and adapt the 'getOptions' method PHP values. That is [00:05:40](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m40s) quite more convenient I suppose than using one line at a time. If we look at the user, you have two fields then, one for the 'getExclude' method and one for the 'getGroup' method. They are also immediately available to you.
### Advantage - Extra Properties Options - Listclass Option
[00:06:05](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m05s)
The other advantage with this implementation is, we have this new Extra properties option which has been available in JCB for some time. Many of you may not know that it exists. There is what we call 'listclass'. If you want to add a class like a CSS class value to the field when it appears in the list area. [00:06:29](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m29s) Let me show you this area(see video), this is the list area. Well any of the views where you see a list of items and you want this specific value to have a specific CSS class value because maybe you want to style it somewhat different. Then you have this option to use. All you need to do is [00:06:53](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m53s) click 'listclass' and you add there 'my-class-dean'. Whatever you want to call it. It will add that the class to the [00:07:15](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m15s) field in the list area which is quite stunning.
The other advantage of this implementation is, we have this new Extra properties option which has been available in JCB for some time. Many of you may not know that it exists. There is what we call 'listclass'. If you want to add a class like a CSS class value to the field when it appears in the list area. [00:06:29](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m29s) Let me show you this area(see video), this is the list area. Well, any of the views where you see a list of items and you want this specific value to have a specific CSS class value because maybe you want to style it somewhat differently. Then you have this option to use. All you need to do is [00:06:53](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m53s) click 'listclass' and you add there 'my-class-dean'. Whatever you want to call it. It will add that the class to the [00:07:15](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m15s) field in the list area which is quite stunning.
### Escape Option
@ -44,14 +41,12 @@ There is also the 'Escape' Option. If you escape a value, all the values are esc
[00:08:06](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m06s)
The other option which is also available. It is the 'Display option'. We will still add some more documentation to this, but it is about when the field gets displayed in a config, it is when a component have this options area. You can add Fields to that option area. When a field is added to the option area, it has implementation structures. You can let it show in the menu, you can let it show in various places.[00:08:43](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m43s) I will make a tutorial about this specifically. But just to show you quickly that that is also are available.
The other option is also available. It is the 'Display option'. We will still add some more documentation to this, but it is about when the field gets displayed in config, it is when a component has this options area. You can add Fields to that option area. When a field is added to the option area, it has implementation structures. You can let it show in the menu, you can let it show in various places. [00:08:43](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m43s) I will make a tutorial about this specifically. But just to show you quickly that that is also are available.
### Validate Option
[00:08:53](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m53s)
Last but not least,there is 'Validate'. Not all fields have the property to validate the value. There are Validation Rules. You can add a validation to this field, if that property is not available in the field type, which you have selected. If it is, we would suggest that you add it to the properties at the top. It says that, if you have a validation set as a field property, this extra property will not be needed because you can just use that one. [00:09:33](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m33s)
Last but not least, there is 'Validate'. Not all fields have the property to validate the value. There are Validation Rules. You can add a validation to this field if that property is not available in the field type, which you have selected. If it is, we would suggest that you add it to the properties at the top. It says that, if you have a validation set as a field property, this extra property will not be needed because you can just use that one. [00:09:33](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m33s)
That was a quick demonstration of the new field area. We trust that it will be as easy and as comfortable as we hoped it would be. Trust that this change would not frustrate you, but be great. Because one of the unforeseen [00:10:00](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m00s) outcomes for example may be, if you have a field like this which already has all its values and you are thinking on changing it and say, let me just check how will the text look. You can change it and it really adds all your text value with its defaults. If you say no, I want to go back, you can click back, and your values which were there originally has [00:10:25](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m25s) again been added to the page. That is even true if you were to remove a specific property. <<<<<<<<<<<<<<<<<<<
Then you want to add it back, it adds the original value back, was what we intended because by accident [00:10:48](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m48s) you might remove it and want to just put it back. It should be as easy as that. You could still go to Type Info to see what could be the default values and adapt them. It's not like you don't have access to the default values, it's just that we want to [00:11:10](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m10s) recover your current saved value for you. Whenever you add another field which isn't already here, this drop down list only shows the fields that are not already on the page. You won't end up adding fields properties the second time. It has become much more easier to build fields and its properties [00:11:39](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m39s) as before. You really had to navigate through some of the complexities of dealing with an XML set of values. Which maybe some of you don't even know exactly what's going on. Those of you that do, I mean it's not like you're losing any advantage with the new implementation, [00:12:02](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m02s) you are still targeting that value with any value you want. It's still as easy as clicking a plus and selecting a value and adding it. I do hope that all of you will be as excited about this change as we are . We are now at the point where making JCB easy-to-use is also a priority.
That was a quick demonstration of the new field area. We trust that it will be as easy and as comfortable as we hoped it would be. Trust that this change would not frustrate you, but be great. Because of one of the unforeseen [00:10:00](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m00s) outcomes, for example, maybe, if you have a field like this which already has all its values and you are thinking of changing it and say, let me just check how will the text look. You can change it and it really adds all your text value with its defaults. If you say no, I want to go back, you can click back, and your values which were there originally has [00:10:25](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m25s) again been added to the page. That is even true if you were to remove a specific property and you want to add it back, it adds the original value back because by accident [00:10:48](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m48s) you might remove it and want to just put it back. It should be as easy as that. You could still go to 'Type Info' to see what could be the default values and adapt them. It is not like you do not have access to the default values, it is just that we want to [00:11:10](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m10s) recover your current saved value for you. Whenever you add another field that is not already here, this drop-down list only shows the fields that are not already on the page. You will not end up adding field properties the second time. It has become much easier to build fields and their properties as before. [00:11:39](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m39s) You really had to navigate through some of the complexities of dealing with an XML set of values of which maybe some of you do not know what is going on. Those of you that do, I mean it is not like you are losing any advantage with the new implementation, [00:12:02](https://www.youtube.com/watch?v=26x_Sc8jbp8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m02s) you are still targeting that value with any value you want. It is still as easy as clicking a plus and selecting a value and adding it. I do hope that all of you will be as excited about this change as we are. We are now at the point where making JCB easy-to-use is also a priority.