Skip to main content

Field-Based Joomla Config Generation

Automatically generate your componentโ€™s configuration form based on field definitions.

What Is It?

In Joomla Component Builder (JCB), you can define global component settings using standard JCB Fields. These fields are rendered in the Joomla Component Options screen (accessible via the Options button in Joomlaโ€™s backend Components menu).

Instead of manually writing XML config forms, you:

  • Use JCBโ€™s Field system to define parameters
  • Select which fields should appear in the Options screen
  • Let JCB generate the config XML and backend logic during compile

This aligns with Joomlaโ€™s native component configuration API, ensuring consistent structure, validation, and ACL support.

Key Benefits

  • Reusable Fields
    Use any JCB field type (text, list, toggle, etc.) โ€” including shared field types with validation and logic.
  • No Manual XML Required
    Fields marked for configuration are compiled automatically into config.xml.
  • ACL-Aware Fields
    Apply access/view/edit control to fields using JCBโ€™s GUI-based ACL rules.
  • Consistent Display & Validation
    Support for labels, descriptions, tooltips, required state, and custom validation.
  • Round-Trip Capable
    Updates in JCB update the compiled XML โ€” no need to manually maintain config.

How It Works

  1. Go to Fields in JCB and create a new field (e.g., text, textarea, toggle, list).
  2. In the Component โ†’ Component Config set the fields and their tab name.
  3. On compile:
    • JCB generates the config.xml with proper fieldsets/fields.
    • Values are stored in Joomlaโ€™s component params.

Use Cases

  • API keys or tokens
  • Default permissions or toggles
  • Feature switches (e.g., enable/disable email)
  • Default values used across the component
  • Branding settings (logo, footer text, etc.)

Version Control & Sharing

  • Config fields can be shared across components
  • Changes to shared fields update all connected components
  • Tracked via reset/push/fork logic in JCB

Why It Matters

  • Save time by reusing validated field types
  • Create fully integrated Options screens with no manual XML
  • Prevent config drift by tying UI directly to logic
  • Ensure consistent validation and ACL everywhere

Conclusion

With Field-Based Joomla Config Generation, you bring consistency, security, and scalability to your componentโ€™s configuration screen. It saves time, reduces human error, and ensures your global settings evolve alongside the rest of your JCB-powered component.