ADDING NONE DATABASE FIELDS TO AN ADMIN VIEW
New Function - To Add A Field To A View Without Adding The Field To the Database
00:00:00 (Click on these time links to see Youtube video)
We have added a new function to JCB which allows you to add a field to a view without adding the field to the database. When will that be useful? When you have a field that is maybe getting data from another table, and you want to change the behavior on the page, based on the data selected, but that selection itself is not relevant. Or when you want to combine two fields as one in the database, then you could have both fields on the page. 00:00:41 On submission in your save area in the Admin View, you can add some custom PHP script to take the value from that other field, and save it into this field that you intend to combine the two values. You do not want both values to be stored in the database. Or the other option is you have fields on a page, which only get used to generate data in another table. 00:01:16 When you save that item, it takes those values put it into the other table and leave one value in this table which next time when you open it, all those fields are hidden based on that value selection.
Multiple Implementations Helps To Get A Subform On The Page
It has multiple implementations and helps you to get a sub form on the page or any kind of another field type to be able to use it once, use it within your custom scripting either in JavaScript or in PHP. Previously this was not possible. If you add a field to view, it was always going to be stored in the database. But now if you go to Admin Views, let's take one that has the function going. We will use the Admin View fields.
New Feature - None DB
It may be seen that this new feature has replaced your Admin View list option because now you have a 'Show in list'. Then you have the 'Default' which was the previous check or unchecked option, basically is 1 and 0. There is a third one which is called 'None DB'. 00:02:49 I have a field called 'Not Required', which is what you would add if you are using JCB's internal conditional option. If you have fields that are required, but within certain criteria, those fields are hidden, and not required. I am using this 'Not Required' field 00:03:18 to store some values with JavaScript that upon submission, it adapts the validation on the server-side. I do not want that value in the database, so I am using this 'None DB' option. If you changed any other fields, I am going to do a demonstration. I do want this field in the database, but to show you if you select 'None DB', it will automatically give you these two notices. 00:03:50 The one is saying the 'None DB option will remove this field from being saved in the database', and then this one 'only use the 'None DB' option if you are planning on targeting this field with JavaScript or custom PHP to move its value into another field that does get saved to the database'. In one form or another, if you use this value, whatever is placed in it will not be stored in the database. 00:04:21 You will need to manually do that. It is there for customization of the behavior of your component. It also clears out all your selections, because none of these features will be of use, or available to this field because this field 00:04:47 after saving, dumps the value and it does not exist unless you grab it and use it into your script. If you use the list option, we have this automated counter adding. 00:05:08 Every time you do that it counts all the fields that are available in your script. It adds the next logic number.
This was to show you that there is a new 'None DB' field behavior that some of you have been requested. If it does not make sense to you just do not use it.
- 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