Skip to main content

Create Dynamic Models with Modals and Selectors

Modals and dynamic model selectors bring relationship management to life in Joomla — enabling components that feel interactive, relational, and deeply integrated

What It Does

Joomla Component Builder (JCB) allows you to connect views and fields across your component using dynamic models that feature modals and selectors. These dynamic model integrations enable:

  • Select fields that open modals to pick a related record
  • Subform relationships between two Admin Views
  • Seamless linkage between items (e.g., users, tags, categories, custom views)

These selectors make use of JCB’s internal mapping system to generate the necessary queries, models, and form field types — reducing development overhead.

Types of Supported Model Linkage

  • Modal Selectors: Trigger a pop-up modal from a select/dropdown field to browse and select a related record.
  • AJAX Selectors: Fetch remote records on-the-fly as you type.
  • Subform Selectors: Embed another view as a nested structure (e.g., child items inside a parent).
  • Multi-select linking: Select multiple related entities from another model.

Where You Configure This

Inside the Field entity (usually with field type custom_modal or ajax selector), define:

  • The source view/component being linked
  • The method for retrieving and displaying related data
  • Any restrictions (filter by category, published only, etc.)
  • The display template used inside the modal

Use Cases

  • Associate a Product with a Manufacturer using a modal selector
  • Add nested Address entries to a User profile via subform
  • Use AJAX-powered selectors to connect large datasets (e.g., select Tags or Users dynamically)
  • Build complex relationships like many-to-many via hidden join tables and selectors

Benefits

  • ✅ Visual linking of models and records
  • ✅ Cleaner forms with intelligent selection UX
  • ✅ No need to hand-code joins or modal logic
  • ✅ Scalable UI even for large datasets
  • ✅ Works seamlessly with Dynamic GETs, ACL, and form validation

Conclusion

Modals and dynamic model selectors bring relationship management to life in Joomla — enabling components that feel interactive, relational, and deeply integrated. JCB provides the backend logic, model access, and frontend UI all from one place — so you focus on the design, not the boilerplate.