๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
๐งฑ Custom Code System (Powerful Dual Feature)
๐ Field Type System
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
๐ฆ Packages
๐งฉ Architecture & Core Logic
๐ File & Code Management
๐ง Code Reuse & Blueprints
๐ Joomla CMS Integration
๐จ Visual GUI & UX
๐ Internationalization
๐ฆ Packaging & Distribution
โ๏ธ Compiler Engine Features
๐งฑ Custom Code System
๐ Field Type System
๐ Dynamic GET (Visual SQL Engine)
๐ Snippets, Templates, Layouts, Libraries
๐ Documentation & Metadata
๐ Analytics & Insights
๐งฉ Architecture & Core Logic
- Super Powers
- Joomla Powers
- Compile Native Components, Plugins & Modules
- Multi-Version Support
- Conditional Logic Injection
- Reusable Admin Views
- Dynamic GET Builder
- Round-Trip Code Integration
- Custom Admin Views
- Site Views
- Dynamic Dashboards
- Model Linking Between Views
- Shared Field Reuse Across Views
- Drag & Drop Field Mapping
- Dynamic Field Visibility
- Independent Packaging
๐ Joomla CMS Integration
- Token Integration
- ACL Per View, Field, Item
- Field-Based Joomla Config Generation
- Support For Joomla Categories/Tags/Custom Fields
- CLI-Ready Components
- Joomla Update Server Integration
- Version-Aware Language String Compilation
- Remote Publishing to Custom Repo Update Streams
๐ Field Type System
- Field Types Define Templates And Data Types
- Gui Defined Rules Required Unique Nullable
- Save Get Hooks Per Field
- Database Schema Auto Generated From Field Settings
- Per Display Field Rendering Config List Edit
- Create Dynamic Models With Modals Selectors
- Conditional Js And Css Per Field
๐ Snippets, Templates, Layouts, Libraries
- Snippets Reusable Html Blocks
- Layouts Reusable Php Render Templates
- Templates Page Level Views Linked To Custom Admin Site Views
- Libraries JS CSS Assets Linked To UI
- CDN Local Toggle For Library Delivery
- Media Folder Injection With Override Support
- Repository Push Pull Reset Workflow
- Init Snippets Layouts Templates Via Gui
Custom Scripting Per Field
Attach logic to individual fields โ control behavior on save, load, or render
What Is Custom Scripting Per Field?
JCB allows you to assign custom PHP logic to individual fields at key lifecycle moments โ such as when a value is loaded (get), saved (store), or rendered (shown in a form or list). This gives you field-level control over how data is processed and displayed, far beyond the standard Joomla field behavior.
You can define reusable scripts or write custom code directly in the fieldโs settings. This logic becomes part of your componentโs compiled output and executes exactly where you need it.
Key Features
- ๐ง Save & Get Hooks: Define logic that runs:
- Before saving the field value (
onSave
) - When retrieving the field value (
onGet
)
- Before saving the field value (
- ๐ผ๏ธ Render Control: Modify how the field appears in:
- Admin or Site edit forms
- List/table views
- Read-only or config-only displays
- ๐ Multiple Contexts Supported: Apply logic in:
- Admin edit view
- Site view
- Config view
- Backend list/table view
- ๐ก Conditional Logic: Add
if
/else
,switch
, or decisions based on user group, other field values, or context. - ๐ฆ Snippet Integration: Reference reusable Snippets or call shared helper functions.
- ๐งช Fully Compile-Time Controlled: Embedded directly into compiled field handlers โ no post-compile editing required.
- ๐ Safe & Isolated: Field scripting wonโt affect other logic unless explicitly linked.
Common Use Cases
- Format a date/time value on load
- Auto-populate a field based on another fieldโs value
- Run validation or transformation before saving
- Show/hide fields conditionally at runtime
- Generate dynamic dropdown values from a helper method
- Encrypt or sanitize field input before storage
How to Use It
- Go to Fields.
- Select or create a field.
- Find and select the โCustom Fieldโ Field Type.
- Add PHP code or use getOptions methods. Examples:
// Get the databse object. $db = Factory::getDBO(); $query = $db->getQuery(true); $query->select($db->quoteName(array('a.###ID###','a.###TEXT###'),array('###ID###'))); $query->from($db->quoteName('###TABLE###', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.###TEXT### ASC');
- Save and build the component. The logic will be compiled into the field handler.
๐ง Pro Tip: Use insert/replace tags if you want the logic to remain editable directly in your IDE post-compile.
Conclusion
Custom scripting per field gives you surgical precision over field behavior โ without needing to write full models or controllers. Itโs an ideal way to enhance forms, enforce logic, and fine-tune data handling in a way thatโs clean, reusable, and easy to maintain.