๐งฉ 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
JavaScript Callback Logic on Field Events
Attach custom JS logic to field-level events for dynamic, responsive interfaces.
What It Does
JS Callback Logic lets you:
- Listen for changes on any field (select, input, checkbox, etc.)
- Bind one or more JavaScript functions to that change event
- Dynamically modify the DOM or field behavior
- Load external JS libraries to enhance interactivity
- Write modular callback functions for reuse
This bridges the gap between static form rendering and dynamic client-side logic.
How to Set It Up in JCB
- Go to any Field inside an Admin or Site View
- Scroll to the Script tab
- Add the callback code in the JS Callback field
- You can also define the callback as a named function in a JS library and simply call it
- Use
$this
ordocument.querySelector
for scoped manipulation
The JS you write here is injected inline or loaded via JCB's compiled view logic.
Examples
Here are a few typical use cases:
๐ Conditional Visibility
Show a field only if another field equals "Yes"
document.querySelector('#jform_enable_extra').addEventListener('change', function () {
const display = this.value === '1' ? 'block' : 'none';
document.querySelector('#jform_extra_details').closest('.control-group').style.display = display;
});
๐ Recalculate Fields on Input
Recalculate a field when another field is updated
document.querySelector('#jform_quantity').addEventListener('input', function () {
const unitPrice = parseFloat(document.querySelector('#jform_price').value || 0);
document.querySelector('#jform_total').value = (unitPrice * this.value).toFixed(2);
});
๐ฆ Load Fields Dynamically
Load new field options via AJAX based on another fieldโs value
$('#jform_category_id').on('change', function() {
const categoryId = $(this).val();
$.get('/index.php?option=com_mycomp&task=ajax.loadSubfields&id=' + categoryId, function(data) {
$('#jform_subfield_id').html(data);
});
});
Where It Works
- โ Admin Views
- โ Custom Admin Views
- โ Site Views
- โ Dynamic Field Types
- โ Templates and Layouts via JS-injected Libraries
Best Practices
- Keep JS modular โ reference external functions where possible
- Use event delegation for dynamically rendered fields
- Namespace your JS functions to avoid collisions
- Test in multiple Joomla versions (J4, J5) for compatibility
Bonus: JS Callbacks + Snippets
JS logic can also be included in Layout Snippets or Template Snippets if more complex interactions are needed. These JS snippets can be reused across views and linked conditionally via GUI.
Summary
This feature allows you to define JavaScript functions that are triggered when field values change in your backend (admin view) or frontend (site view) forms. It's a powerful way to inject behavior like conditional visibility, dynamic validation, or real-time UI feedback โ all through JCB's GUI.