-
-
Notifications
You must be signed in to change notification settings - Fork 178
029 How to overwrite the custom fields
It may happen that you would prefer to use some of the default fields in a different manner than that of Component Builder's way of implementation. What is the default fields? 00:00:12 If you go to add a new Admin View or to an Admin View that already exists, it may be seen that there is this note above Adding Fields. It indicates that the 'ID', the 'asset_id', the 'state', the 'access', the 'ordering', the 'created_by', the 'date_created', 'modified_by', 'date_modified', 'checked_out', 'Check_out_time', 'version', 'hits', 'metakey', 'metadescription', and 'metadata' is already added to the view. 00:00:41 These are the default fields that always gets added to the view even if you do not create them. In fact it is not necessary to create them. Sometimes you might want to display some of these fields in a different area of the application. Currently the ID field and the State field is the only field that is been shown by default in the List view. 00:01:20
In the Experts area the 'Id field', the 'Status field' and as well as the Ordering field are shown. The Ordering field does not show the order number. To be able to move and order it, click on that "Up/Down" button(see video),. 00:01:45 All that is done by default. The other values are not displayed in the List View. Once a client requested that it should be possible to see the date on which something had been created as well as the identity of the person who created it. Component Builder then needed to be adapted so that those things could also be overwritten. What has been done is: If a field is created in Component Builder, as a field would normally be created and any of these names should be given to it, 'Created by' or 'Created date', but exactly the same name. 00:02:23 Then it will override the default.
In this specific Job Order view, there is a field 'Created-by'. That may be opened in a new tab, there is also a field 'Created-date'. 00:02:57 So in this field the 'Name' and 'Created_by', and 'User' is the type of field that is used. The label is 'Created by', and the user that 'Created this' is the description. 00:03:26 That's all that is needed for a user type. Then in the Created-date, it's a calendar type. 'Created', the date, it was created, the label and some of its defaults are used.<<<<<<<<<<<<<<<,
These values, if you don't know them, you can actually go and look at the compiled 00:03:51 field. So in the back end of your component, open administrator, components, then the relevant component. You would open models and then there is a place called forms, you would open it. And you'd see a list of forms that correspond to the back end views that you've created. Now in our case this job order is the one. 00:04:19 You will obviously open the XML. Double click on it, scrolling down. You can look at modified by, and some of its default. So you going to overwrite this value. Then you need to update or use these values. Make sure this is the only part you shouldn't change, if you change it, 00:04:45 we won't know that you're trying to overwrite one of the default fields because it uses the name as the identifier. Back in editing the field. We basically created the fields that was the first part. Close them again.
We would like any normal, any other field, 00:05:08 we simply go to fields, we added those fields. There's the created-date and there is the created-by. We add both to be shown, and also the position and how it should be treated. We set it was be in the left tab of the 15th. 00:05:37
The other thing, if you would like the fields to display in the same place as before, in the edit view, then you would add it to the 15th tab. I reckoned that its very unlikely that somebody would create so many tabs. Now what is a tab? If you would to go to the view, then this is tab 1 this tab 2 3 4 5 and 6(see video). Since publishing can really vary. 00:06:14 It wasn't making any sense to me that I would targeted in any way directly as the 5th of the 4th. So I took a very high number 15. If you select the number 15, it will add these two fields in the same place it would if it had to build it for you. But if for some reason you say no I want to also display the field in a different tab, you could click and put in the 3rd tab, you click save, 00:06:53 then you compile the components, install it. You will see 1, 2, 3, it's in the third tab, it's showing up. That's all you had to do as they had to say and what tab you would like it now to display. If you go here(publishing) you would see the create date no longer shows in the publish tab. Its only created by that shows up here. It literally moves the field to a different tab, 00:07:24 as well as displays the field in the list view. Simply because you added the fields here(see video), you set that you wanted to display and you added to the third tab. I'm going to move it back to 15. Which is the tab number if you wanted to be in its default place. I click save and then save there, compile this, install it. 00:08:03 Basically updating the component. Refresh the page, if we go to where it was, it's no longer showing there(documents), it's not showing there(production), It is not showing there(stock list), it's back in published in the correct place. That's where it will be set if you don't overwrite it. Using the 15th tab as the the target puts it's in default place. If you use another tab number, it removes it from its default place, and puts it where you have assigned it to be placed. That is how you can overwrite the custom added fields, fields of a back end view. 00:08:49 I hope that will be very helpful.
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values